I have a spreadsheet and in Column 1 it has different statuses of deliverables (delayed, unknown user, received, etc.....) and in Column 5 we want to list the action related to the status (Research, Server or Undeliverable). Is there a way to write a nested IF OR function that could update Column 5 to either Research of Undeliverable if, for instance, Cell A2 had either delayed or unknown user?
This is what I have so far:
=IF(A2>="delayed","Research")
When I try adding an OR I keep getting errors.
答案 0 :(得分:1)
Assuming this is Excel (no tag for it), try the following:
=IF(OR(A2="delayed", A2="unknown"),"Research", "")
This will put "Research" in the field if the value in A2 is "delayed" or "unknown", and a blank if not.
You can also chain these statements to list additional checks as follows:
=IF(OR(A2="delayed", A2="unknown"),"Research", IF(A2="Received", A2="unknown"),"Server", ""))
I just grabbed values out of your question above for that one, but this should put you on the right track.
答案 1 :(得分:0)
The alternative here is to use a VLOOKUP function instead of IF/OR. VLOOKUP takes a unique value, looks at a table you give it, and checks to see if that unique value matches any row in the first column. The first time it matches, it gives you the value from a column a set number of columns to the right, within the table you give it.
So, you just need to make a table in, say, C1:D5. Column C will have the status, and column D will have the action related to that status.
Then assume A2:A100 has your different statuses. In B2, put the following formula, and copy down:
=VLOOKUP(B2,$C$1:$D$5,2,FALSE)
This will look for unique value B2 (then B3, etc.), in column C, from rows 1 to 5. If there is a match, it will give you the value from that row in column D (the 2 column of the given table). 'FALSE' says that it will not try to return a 'close' value (which is really for sorted alphanumeric indexes where something 'close' is acceptable). If it doesn't find a match, it will return the error #N/A! which seems appropriate for your purposes (presumably every item should match, or else it is mistyped.