IF statement problem
I have an if statement, and for either the true or false conditional statements, I would like to type some text and have a number displayed. This number is calculated by some formula. For example, IF(MOD(ROW(),2)=0,"The current row; "ROW()" is even.", "This row is odd.") But the above syntax is incorrect. What is the correct syntax to perform this type of operation? -- Kalabalana ------------------------------------------------------------------------ Kalabalana's Profile: http://www.excelforum.com/member.php...o&userid=11433 View this thread: http://www.excelforum.com/showthread...hreadid=314582 |
=IF(MOD(ROW(),2)=0,"The current row; "&ROW()&" is even.","The current row;
"&ROW()&" is odd.") -- HTH RP (remove nothere from the email address if mailing direct) "Kalabalana" wrote in message ... I have an if statement, and for either the true or false conditional statements, I would like to type some text and have a number displayed. This number is calculated by some formula. For example, IF(MOD(ROW(),2)=0,"The current row; "ROW()" is even.", "This row is odd.") But the above syntax is incorrect. What is the correct syntax to perform this type of operation? -- Kalabalana ------------------------------------------------------------------------ Kalabalana's Profile: http://www.excelforum.com/member.php...o&userid=11433 View this thread: http://www.excelforum.com/showthread...hreadid=314582 |
One way:
=IF(MOD(ROW(),2)=0,"The current row; " & ROW() &" is even.", "This row is odd.") A variant: ="This row is " & IF(MOD(ROW(),2),"odd.","even.") In article , Kalabalana wrote: I have an if statement, and for either the true or false conditional statements, I would like to type some text and have a number displayed. This number is calculated by some formula. For example, IF(MOD(ROW(),2)=0,"The current row; "ROW()" is even.", "This row is odd.") But the above syntax is incorrect. What is the correct syntax to perform this type of operation? |
=IF(MOD(ROW(),2)=0,"The current row " & ROW() & " is even.", "This row is odd.") -- crispbd ------------------------------------------------------------------------ crispbd's Profile: http://www.excelforum.com/member.php...o&userid=10880 View this thread: http://www.excelforum.com/showthread...hreadid=314582 |
excellent thank you all for your help -- Kalabalana ------------------------------------------------------------------------ Kalabalana's Profile: http://www.excelforum.com/member.php...o&userid=11433 View this thread: http://www.excelforum.com/showthread...hreadid=314582 |
All times are GMT +1. The time now is 02:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com