You can do it by nesting your IF statements: =IF(H3=TRUE,TRUE,IF(B2<B3,TRUE,FALSE))
Basically, you're saying IF(condition1, true, if condition1 false then if( condition2, true, false)) You can do this several times although the formulas tend to get complicated. IIRC the limit is 9 nested IF statements. -----Original Message----- From: excel-macros@googlegroups.com [mailto:excel-mac...@googlegroups.com] On Behalf Of Angus Sent: Thursday, March 05, 2009 11:15 AM To: MS EXCEL AND VBA MACROS Subject: $$Excel-Macros$$ Want to write something like this - =IF(H3=TRUE OR B2 < B3, TRUE) Hello I want an if which checks two conditions If it was in C++ would look like this: if(H3 == "TRUE") || (B2 < B3) //update cell contents to "TRUE" The || is like an OR - ie can be this or that. Hopw can I do this in Excel VBA? Angus --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---