community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

writing formula to excel output

Meteoroid

Hi Guys!

 

My Goal is to have this formula be written in the excel output and that the reference value is incremening example. G2, G3 and so on.

 

=IF(G2>75000000,"GCM",IF(G2>2500000,"GCM",IF(G2>500000,"RCM",IF(G2>250000,"CVA CBC",IF(G2=0,"NA","CVA COC")))))"

 

 

My issue is that i am having a parse error when i try to use totstring since i need the reference cell to be running. below is the formula which i am having parse error

 

"=IF(G"+ToString([RecordID]+1,0)>75000000,"GCM",IF(G2>2500000,"GCM",IF(G2>500000,"RCM",IF(G2>250000,"CVA CBC",IF(G2=0,"NA","CVA COC")))))".

 

Thanks,

Kris

Quasar

Hi @KEPM23 ,

Alteryx applies  formula to every row . Use  column name in formula  and  there is no need to create excel  cell in formula for every row  . 

 

 

Meteoroid

Hello @benakesh,

 

The output that i needed is the actual formula since the output file may need some changes.

 

Asteroid

@KEPM23 You can't output formulas to Excel. You can to a csv, but not Excel.

Meteoroid

@32bit yes you are right that it should be in CSV file, but i want to write is in xlsx file then we just perform a text to column just to have the formula be live in the xlsx file. 

 

I am following this thread below which helps me, however the formula that i am trying to write should be like this that the cell G2 must be incrementing.

 

=IF(G2>75000000,"DCM",IF(G2>2500000,"GCM",IF(G2>500000,"RCM",IF(G2>250000,"CVA CBC",IF(G2=0,"NA","CVA COC")))))

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Writing-Formulas-to-Excel/ta-p/1233...

Quasar

Hi @KEPM23 ,

Try this  : create  new excel cell  and  replace G2 with new cell  in the formula  . 

clipboard_image_0.png

 

clipboard_image_1.png

 

Highlighted
Meteoroid

got it benakesh! thanks a lot for your help!

Labels