INDEX or VLOOKUP??

JTL9161

Active Member
Joined
Aug 29, 2012
Messages
345
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
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
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
 

JTL9161

Active Member
Joined
Aug 29, 2012
Messages
345
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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,270
Messages
5,600,638
Members
414,398
Latest member
dhune

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
Top