excel if condition

Copper Contributor

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?

2 Replies

@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")&");"
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.