Using MID w/ IF

Rembrandt7

New Member
Joined
Jan 18, 2017
Messages
3
I am trying to use mid with if, I tried nest IF, but that didn't work. I am using the following it work but will not give me the response I need.

=LOOKUP(MID(ROOM_NUMBER,2,1)+0,1,"1st Floor")


ROOM_NUMBERFLOOR
N1017

<tbody>
</tbody>
=LOOKUP(MID(ROOM_NUMBER,2,1)+0,1,"1st Floor")
N1047

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
First, is ROOM_NUMBER a named range and second, what are you trying to do exactly?
 
Upvote 0
you haven't told us what you want to output

Room_number - is that a named range
or the column

explain the data structure and what output you would like
 
Upvote 0
If it is a named range, this is my guess of what you want:
=MID(ROOM_NUMBER,2,1) & LOOKUP(MID(ROOM_NUMBER,2,1)+0,{1,2,3,4},{"st","nd","rd","th"}) & " Floor"

or a littler shorter:

=MID(ROOM_NUMBER,2,1) & CHOOSE(MIN(MID(ROOM_NUMBER,2,1),4),"st","nd","rd","th")&" Floor"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,629
Members
449,241
Latest member
NoniJ

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