Vlookup with IF statement or other ideas?

jberg123

New Member
Joined
Feb 24, 2011
Messages
45
Imagine companies of two categories, A and B.
They have all different market values.
One column per company (categories mixed, ie. NOT the first x are A, rest B).

Row 1 gives market value
Row 2 gives category (A or B)
Row 3 gives rank within category (so there are two number 1s etc)

Now, on another sheet I have:

Category A
1
2
3
...
Category B
1
2
3
...


Next to the rank number I want the company name.

Just a vlookup on the rank won't help as I need the condition of the category.

The companies' category may change so it needs to be flexible.
Any ideas?

Totally lost. Was thinking about some VLOOKUP with IF statement in some CSE-function, but no luck.

Thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I've done this on one sheet, but certainly the same results could be achieved on a second sheet. This could be done without the helper cells, but to me this is an easy way to go. See if it is any use to you.

1. Add a new row 1 above the company names.
2. Formula in B1 copied across. (You could hide row 1 at this point if you want)
3. Formula in I2 copied across.
4. Formula in I4 copied across and down.

I assume that you already have the formulas/results for what is my row 5 since you haven't asked about that.

BTW, what version of Excel are you using?

Excel Workbook
ABCDEFGHIJ
1A1B2A2A3B1
2Name:Company 1Company 2Company 3Company 4Company 532
3MV:85639Category:AB
4Category:ABAAB1Company 1Company 5
5Rank:122312Company 3Company 2
63Company 4
74
Company Rank
 
Upvote 0
Brilliant!!! Works very well.

Clever idea...

Working in 2003. Company shifting to 2007 in near future. Dreaing the moment...
 
Upvote 0
Thanks. :)

It's probably a bit early for you then but in Excel 2007+ you can dispense with the formulas in I2:J2 and use this formula in I4 (across & down).

BTW, if your company could be persuaded to skip Excel 2007 and move straight to Excel 2010, I think most users would be happier. :cool:

Excel Workbook
ABCDEFGHIJ
1A1B2A2A3B1
2Name:Company 1Company 2Company 3Company 4Company 5
3MV:85639Category:AB
4Category:ABAAB1Company 1Company 5
5Rank:122312Company 3Company 2
63Company 4
74
Company Rank (2007+)
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,841
Members
452,948
Latest member
UsmanAli786

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