#1
|
|||
|
|||
If or formula help
I have this formula =IF(OR(ISNUMBER(SEARCH("R102",A:A)),(ISNUMBER(SEAR CH("8505",A:A)))),"NSA", "")
It works great but I cannot seem to be able to add more criteria. I would like to be able to expand it quite a bit. I have tried creating a VBA statement but no luck |
#2
|
|||
|
|||
Please describe what you are trying to do.
|
#3
|
|||
|
|||
I want to insert NSA in column C cells if column A cells contain R102, 8500, 8501, 8502, 68 and others
|
#4
|
||||
|
||||
You can create a table of values to look for off to the side then reference that list..
e.g =IF(Isnumber(Match(A2,$Y$2:$Y$10,0)),"NSA","") copied down where Y2:Y10 contains the list of values to find in column A |
#5
|
|||
|
|||
NBVC
Thanks that will work and very easy. |
#6
|
|||
|
|||
Is it possible to combine these? If not no big deal. I will just use separate columns for the tables.
=IF(Isnumber(Match(A2,$Y$2:$Y$10,0)),"NSA","")+ =IF(Isnumber(Match(A2,$Z$2:$Z$10,0)),"MEAAP","")+ =IF(Isnumber(Match(A2,$AA$2:$AA$10,0)),"EUM","") |
#7
|
||||
|
||||
You can try this:
Add titles to Y1:AA1 (which are the same as results you want returned for the respective columns).. then use formula: =IFERROR(INDEX($Y$1:$AA$1,SUMPRODUCT(($Y$2:$AA$5=$ A2)*((COLUMN($Y$2:$AA$5)-COLUMN($Y$2:$Y$5)+1)))),"") copied down. or if you only have 2 or three possibilies a simple nested if.. =IF(ISNUMBER(MATCH(A2,$Y$2:$Y$10,0)),"NSA",IF( ISNUMBER(MATCH(A2,$Z$2:$Z$10,0)),"MEEPA",IF( ISNUMBER(MATCH(A2,$AA$2:$AA$10,0)),"EUM",""))) |
#8
|
|||
|
|||
Awesome. the second formula is exactly what I needed. Thanks
|
#9
|
|||
|
|||
When the list of values to check is not too long, and you don't foresee a need to edit formula in future:
Code:
=IF(ISERROR(MATCH(A2,{"R102";"8500";"8501";"8502";"68"};0)),"","NSA") Code:
=IF(ISERROR(MATCH(A2,CheckVal,0)),"","NSA") I'm not sure about array delimiter in 1st formula for US setings (is it comma or semicolon) - you have to check it yourself! In case you need to return different values for different check lists, then VLOOKUP() is better solution. Enter check list values and according return values into 2-column table (e.g. CheckValue, ReturnValue), and define table's datarange as Named Range (e.g. nCheckTable), or define the table as Table (Insert > Table), e.g. tCheckTable The formula will be: Code:
=IFERROR(VLOOKUP(A2,nCheckTable,2,0)),"") Code:
=IFERROR(VLOOKUP(A2,tCheckTable,2,0)),"") |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formula Copy Row 2 Row But Next Column In Formula From Another Tab | TimG | Excel | 3 | 04-16-2018 09:20 PM |
Help with Formula | Ragincajun22 | Excel | 1 | 08-24-2017 08:44 AM |
Possible to use an existing vlookup formula to also insert correct info and trigger a SUM formula | innkeeper9 | Excel | 2 | 09-13-2016 08:59 PM |
Need help with dragging a formula and changing a reference column as I drag the formula. | LupeB | Excel | 1 | 10-22-2015 03:02 PM |
Formula help | furface00 | Excel | 10 | 02-26-2012 05:34 AM |