Nested If(Search

Celticfc

Board Regular
Joined
Feb 28, 2016
Messages
153
Hi,

In Column N,

I have a drop down with 7 options:

Later
Next 1
Next 2
Next 33
Future 3
Future 4
Future 43

In column M, I want to categorise them in 3 options = Later, Next and Future but I’m getting value error.

This is what I tried:
=if(search(“later”,n2),”later”,””)&if(search(“next”,n2),”next”,””)&if(search(“future”,n2),”future”,””)
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Try:

=LOOKUP(LEFT(N2),{"F","L","N"},{"Future","Later","Next"})

Thank you, this gave me NA error.

By the way there's a dash between text and digits e.g. A Future - 43, B Future - 3, B Pro 1 etc. Could this be the NA reason?
 
Last edited:
Upvote 0
It'll give you an N/A error if N2 is empty, or if it starts with something other than F, L or N. The dash shouldn't matter. Jonmo's formula should work as long as there's a space after the first word.
 
Upvote 0
How about

=LEFT(N2,FIND(" ",N2)-1)

Hi Jonmo1,

I had to amend my dropdown list and been trying to find a way to sort into Now, Pro and Future categories but no luck.

Can you help me with the below? Thank you.

A - now
A - pro 1
A - pro 2
A - pro 3
B - now
B - pro 1
B - pro 2
B - pro 3
C - future 4
C - future 5
 
Upvote 0
2 options:

=IFERROR(LOOKUP(MID(N2,5,1),{"f","n","p"},{"Future","Now","Pro"}),"")

=TRIM(MID(SUBSTITUTE(N2," ",REPT(" ",20)),42,8))
 
Upvote 0

Forum statistics

Threads
1,215,204
Messages
6,123,630
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top