Formula and Vlookup Help

dracron

New Member
Joined
Jan 10, 2014
Messages
32
I have two work sheets where I am using a vlookup to return data (a status to be more specific)

The result could be one of 16 different statuses that we use.

What I would like to do is, based on the status that is returned, it converts to an abbreviation (See below for example)
Right now I am using a run on formula like this:

=IF(VLOOKUP(sheet1!A1,Sheet2!S1:S5,5,false)="Fully Licensed","L",IF(VLOOKUP(sheet1!A1,Sheet2!S1:S5,5,false)="Action Required","A",IF(VLOOKUP(sheet1!A1,Sheet2!S1:S5,5,false)="Pending","p", etc. etc

As you can imagine it is very long.

Is there a way to condense this? I do not want to add an additional column to do another vlookup where it looks at the return result and then vlookup off the status/abbreviation list.
Id like to be contained in one formula.

Status and abbreviation examples:
Action Required</SPAN>
AR</SPAN>
Pending</SPAN>
PN</SPAN>
Scheduled PE</SPAN>
SE</SPAN>
PE Completed</SPAN>
PC</SPAN>
Test Scheduled</SPAN>
T</SPAN>

<TBODY>
</TBODY>


Thank you
 
Last edited:

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Maybe something like this:

=LOOKUP(Sheet1!A1,{"Action Required","PE completed","Pending","Schedule PE","Test Scheduled"},{"AR","PC","PN","SE","T"})

Your lookup items need to be in alphabetical order for this to work correctly.
 
Upvote 0
Maybe something like this:

=LOOKUP(Sheet1!A1,{"Action Required","PE completed","Pending","Schedule PE","Test Scheduled"},{"AR","PC","PN","SE","T"})

Your lookup items need to be in alphabetical order for this to work correctly.


How do you combine this with the first vlookup?

I am doing a vlookup first that finds what the current status is, then based on that result I want it to convert to the abbreviation
 
Upvote 0
Try:

=LOOKUP(VLOOKUP(sheet1!A1,Sheet2!S1:S5,5,false),{"Action Required","PE completed","Pending","Schedule PE","Test Scheduled"},{"AR","PC","PN","SE","T"})
 
Upvote 0
This formula is not correct. It doesn't work.
VLOOKUP(sheet1!A1,Sheet2!S1:S5,5,false)

The second argument, table array, is S1:S5 - a range with just one column.
The third argument, col_index_num, is equal 5 . i.e. the formula should return the 5th column - this is not coherent

M.
 
Upvote 0
This formula is not correct. It doesn't work.
VLOOKUP(sheet1!A1,Sheet2!S1:S5,5,false)

The second argument, table array, is S1:S5 - a range with just one column.
The third argument, col_index_num, is equal 5 . i.e. the formula should return the 5th column - this is not coherent

M.

Good catch Marcelo...I didn't look that closely at the original formula.
 
Upvote 0
Try:

=LOOKUP(VLOOKUP(sheet1!A1,Sheet2!S1:S5,5,false),{"Action Required","PE completed","Pending","Schedule PE","Test Scheduled"},{"AR","PC","PN","SE","T"})


Thank you I think I can get this to work for me.
Appreciate it
 
Upvote 0
This formula is not correct. It doesn't work.
VLOOKUP(sheet1!A1,Sheet2!S1:S5,5,false)

The second argument, table array, is S1:S5 - a range with just one column.
The third argument, col_index_num, is equal 5 . i.e. the formula should return the 5th column - this is not coherent

M.



[h=2]
icon1.png
Re: Formula and Vlookup Help[/h]
Its just an example of what I was doing, it was just a mis-type. If you also read, I do not want to use that type of formula so nitpicking over an irrelevant detail waists time
Please refer to the question I am asking.

"I am doing a vlookup first that finds what the current status is, then based on that result I want it to convert to the abbreviation".

Fictional cells for example can be used to demonstrate​
 
Upvote 0
This will do it for you :)

Do your first vlookup (in bold) which will return the status and then use the table you have the abbreviations in for the 2nd vlookup which will convert to your abbreviation

=VLOOKUP(VLOOKUP(A5,sheet2!A:D,4,FALSE),AG:AH,2,FALSE)
 
Upvote 0

Forum statistics

Threads
1,217,346
Messages
6,136,031
Members
449,979
Latest member
trinitybg10

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