I am using the following formula...
=IF(Sheet1!B7="Tom",Sheet1!B4,0)
I would like to add... OR Sheet1!B5="Tom"
To summarize, if the text in cells Sheet1!B5, Sheet1!B6 or Sheet1! B7 = Tom, then copy Sheet1!B4
How do I add OR and how many OR's can I use?
Thank You.
Last edited by VBA Noob; 07-15-2008 at 02:17 AM.
Maybe =IF(or( Sheet1!B5:B7="Tom"), Sheet1!B4, 0)
This is an array formula, meaning it MUST be confirmed with Ctrl+Shift+Enter, not just Enter. (With the cursor in the formula bar, hold down Ctrl and Shift, then press Enter.) You'll know you did it correctly if curly braces appear around the formula in the Formula Bar; you cannot type in the braces directly.
WHen I enter that formula it seems to want B5, B6 AND B7 to =TOM,
rather than B5, B6 OR B7
Change the OR to AND.
Ctrl+Shift+Enter was the missing link.
Thank You.
You're welcome.
Array formulas are a whole new world, but they can be very slow to calculate. Use only as necessary.
Are there other options rather than using array formuals then? I will probably use more of that same type of formula while creating this series of workbooks.
To go back to your original question, the OR function (and the AND function) starts with the OR and then all the arguments in parenthesisExcel allows up to 30 arguments.=OR(Arg1, arg2, arg3....argn) = arg1 or arg2 or arg3... =IF(OR(Sheet1!B7="Tom",Sheet1!B8="Tom",Sheet1!B9="Tom"),Sheet1!B4,0)
ChemistB
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks