purevtsagaan
New Member
- Joined
- Mar 2, 2014
- Messages
- 4
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]clothes
[/TD]
[TD]transportation
[/TD]
[TD]drinks
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]pants
[/TD]
[TD]car
[/TD]
[TD]coffee
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]shirt
[/TD]
[TD]train
[/TD]
[TD]tea
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]sweater
[/TD]
[TD]bicycle
[/TD]
[TD]juice
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]tie
[/TD]
[TD]plane
[/TD]
[TD]milk
[/TD]
[/TR]
</tbody>[/TABLE]
Hello everyone,
I have been trying so had to make this work.
I want to return "category 1" if the text is found in column A, "category 2"if it is found n column b, "category 3" If it is found in column c, if not found in any column "category 4".
Please help here is sheet and formula, thanks
=IF(SUBSTITUTE(A1, "-", "")=VLOOKUP(SUBSTITUTE(A1,"-",""),sheet1!$A$2:$A$6,1,FALSE),
"CATEGORY 1",
IF(SUBSTITUTE(A1, "-", "")=VLOOKUP(SUBSTITUTE(A1, "-", ""),sheet1!$B$2:$B$6,2,FALSE),
"CATEGORY 2",
IF(SUBSTITUTE(A1, "-", "")=VLOOKUP(SUBSTITUTE(A1, "-", ""),sheet1!$C$2:$C$6,3,FALSE),
"CATEGORY 3",
"Category 4")
)
)
PS: first if statement works but 2nd and 3rd ones do not. Please help me by fixing. Thanks!
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]clothes
[/TD]
[TD]transportation
[/TD]
[TD]drinks
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]pants
[/TD]
[TD]car
[/TD]
[TD]coffee
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]shirt
[/TD]
[TD]train
[/TD]
[TD]tea
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]sweater
[/TD]
[TD]bicycle
[/TD]
[TD]juice
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]tie
[/TD]
[TD]plane
[/TD]
[TD]milk
[/TD]
[/TR]
</tbody>[/TABLE]
Hello everyone,
I have been trying so had to make this work.
I want to return "category 1" if the text is found in column A, "category 2"if it is found n column b, "category 3" If it is found in column c, if not found in any column "category 4".
Please help here is sheet and formula, thanks
=IF(SUBSTITUTE(A1, "-", "")=VLOOKUP(SUBSTITUTE(A1,"-",""),sheet1!$A$2:$A$6,1,FALSE),
"CATEGORY 1",
IF(SUBSTITUTE(A1, "-", "")=VLOOKUP(SUBSTITUTE(A1, "-", ""),sheet1!$B$2:$B$6,2,FALSE),
"CATEGORY 2",
IF(SUBSTITUTE(A1, "-", "")=VLOOKUP(SUBSTITUTE(A1, "-", ""),sheet1!$C$2:$C$6,3,FALSE),
"CATEGORY 3",
"Category 4")
)
)
PS: first if statement works but 2nd and 3rd ones do not. Please help me by fixing. Thanks!