INDEX or VLOOKUP??

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
593
Office Version
  1. 365
Platform
  1. Windows
I am describing this as generic as possible and hopefully with someone help I can expand on it to solve my dilemma. I am importing the array noted below from our database (.txt file to .xls)

B1 = label "Item-A", C1 = label "Item- B" D1 = Blank, E1 = Blank

I need a formula in A1 that will look at an table and see that "Item A" has a value of 5 and "Item B" has a value of 10 and return the label in A1 to say "Item B" since Item B is greater then Item A. (Item A will always compare with Item B, C to D...etc)

Now the twist.
Occasionally Item A could be the only thing listed in B,C,D or E but since its value changed from 5 to 8 in the array but Item B stayed at 10 I need the the label in A1 to still say Item B even though the Item B was not referenced in B,C,D or E. Item B is still in the array I import but with the same value as the day before but they way the daily import works it will not always have both labels in B,C,D, or E.

Eventually Item A may become greater than Item B so then I need the A1 value to change to "Item A" The part I am struggling with is if the label "Item B" does not appear in B,C,D or E. since there wasn't any activity with it. Its still 10 on the table. If both A and B are the same then A1 should be blank.

Sorry for the confusion explaining this but I am working with a file download from our database and am trying to get something out of it with the current format the comes from importing it.


Hoping for some help,
James
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
can you post the first ten lines of the table with your expected result, test it in the test area first, use one of the forum tools to get a postable format
 
Upvote 0
Unfortunately my company block the forum tools part of the site. I'm working on something for a friends hardware business. I may not understand completely what he looking for but I want to give him something to start with. I will try to show and example below.

A1 Formula B1 - "Item A" C1 - "Item B" D1 - Blank E1 - Blank

Table in cells F & G
F1 - Item A G1 - 5
F2 - Item B G2 10

So with the above example I am looking for "Item B" to show in A1 since its greater.

2nd Example
A1 Formula B1 - "Item A" C1 - Blank D1 - Blank E1 - Blank


Table in cells F & G
F1 - Item A G1 - 9
F2 - Item B G2 10

So again with A comparing with B I am looking for "Item B" to show in A1 since its greater.

Hope this helps
Thanks
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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