J jer Nov 1, 2003 #1 Is it possible to write an if statement that includes a criteria, e.g. if a1 does not contain "abc" then b1= 123
Is it possible to write an if statement that includes a criteria, e.g. if a1 does not contain "abc" then b1= 123
A Andy Wiggins Nov 1, 2003 #2 In cell B1 put the formula: IF(A1<>"abc",123,"A1 did not contain abc") If you want to check if "abc" is within a string in cell A1, use the FIND function to test A1's contents. -- Regards Andy Wiggins www.BygSoftware.com Home of "Save and BackUp", "The Excel Auditor" and "Byg Tools for VBA"
In cell B1 put the formula: IF(A1<>"abc",123,"A1 did not contain abc") If you want to check if "abc" is within a string in cell A1, use the FIND function to test A1's contents. -- Regards Andy Wiggins www.BygSoftware.com Home of "Save and BackUp", "The Excel Auditor" and "Byg Tools for VBA"
L Leo Heuser Nov 1, 2003 #3 =IF(A1<>"abc",123) The formula must be entered in B1. You cannot from one cell alter the contents of another cell. -- Best Regards Leo Heuser Excel MVP Followup to newsgroup only please.
=IF(A1<>"abc",123) The formula must be entered in B1. You cannot from one cell alter the contents of another cell. -- Best Regards Leo Heuser Excel MVP Followup to newsgroup only please.