Forum Discussion

azat190588's avatar
azat190588
Copper Contributor
Feb 06, 2024

excel if condition

hello,

 

I'm trying to insert if condition to my formula but excel doesn't like it

 

="INSERT INTO test (col1,col2,col2,col3,col4,col5,col6,col7,col8,col9,col10) 
					VALUES (1,1,11,'"&A331&"',1,111,1,111,NOW(),NOW(),"&if(TEXT(C331;"yyyy-mm-dd")="1900-01-01","default","not default")&");"

 

what's wrong with it?

  • azat190588 

    Does this work?

    ="INSERT INTO test (col1,col2,col2,col3,col4,col5,col6,col7,col8,col9,col10) 
    					VALUES (1,1,11,'"&A331&"',1,111,1,111,NOW(),NOW(),"&IF(TEXT(C331,"yyyy-mm-dd")="1900-01-01","default","not default")&");"
    • azat190588's avatar
      azat190588
      Copper Contributor
      if anyone is interested. in my excel settings delimiter for method parameters is not , but ;
      when I changed this my text function worked out as expected.

Share