SOLVED

Lookup from Bottom cell to Top cell

%3CLINGO-SUB%20id%3D%22lingo-sub-3215772%22%20slang%3D%22en-US%22%3ELookup%20from%20Bottom%20cell%20to%20Top%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3215772%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20once%20again%20in%20need%20your%20expertise.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20got%20a%20specific%20table%20format.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20lookup%20the%20value(will%20be%20located%20at%20the%20top)%20of%20a%20cell%20that%20is%20located%20at%20the%20bottom.%20Another%20thing%20to%20note%20that%2C%20I'll%20be%20looking%20up%20multiple%20values%20from%20bottom%20to%20top%20and%20at%20the%20top%20two%20of%20the%20ranges%20will%20be%20merged.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20trying%20to%20solve%20this%20on%20my%20own%20but%20I%20have%20failed.%20All%20the%20solutions%20I've%20encountered%20work%20with%20from%20top%20to%20bottom.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20attaching%20a%20sample%20workbook%20to%20show%20you%20what%20I%20need.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20again%2C%20I'd%20really%20appreciate%20your%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3215772%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3217141%22%20slang%3D%22en-US%22%3ERe%3A%20Lookup%20from%20Bottom%20cell%20to%20Top%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3217141%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1142876%22%20target%3D%22_blank%22%3E%40kheldar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou've%20had%2067%20views%2C%20but%20not%20a%20single%20reply.%20And%20this%20one%20isn't%20really%20an%20answer%20to%20your%20question.%20Rather%2C%20it's%20a%20suggestion%20that%20you%20start%20over%20and%20make%20far%20more%20clear%20what%20it%20is%20that%20you're%20trying%20to%20do.%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%3CEM%3EI%20need%20to%20lookup%20the%20value(will%20be%20located%20at%20the%20top)%20of%20a%20cell%20that%20is%20located%20at%20the%20bottom.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EHuh%3F!%20That%20sentence%20alone%20makes%20no%20sense.%20Could%20you%20give%20the%20specific%20here...what%20is%20the%20value%2C%20and%20where%20is%20it%3F%20Which%20value%20that%20is%20%22at%20the%20top%20of%20a%20cell%20at%20the%20bottom%22--%3F%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20will%20offer%20one%26nbsp%3Bobservation%20that%20is%20extremely%20important%3A%20you%20have%20spent%20a%20LOT%20of%20time%20making%20this%20spreadsheet%20colorful%3B%20some%20might%20call%20it%20%22pretty%2C%22%20which%20might%20be%20appropriate%20at%20some%20point.%20But%20of%20greater%20importance%20is%20creating%20something%20that%2C%20you%20%26nbsp%3Bknow%2C%20actually%20%3CU%3E%3CEM%3Eworks%3C%2FEM%3E%3C%2FU%3E%2C%20actually%20%3CEM%3E%3CU%3Efunctions%3C%2FU%3E%3C%2FEM%3E.%3CSTRONG%3E%20Leave%20the%20fancy%20coloring%20and%20formatting%20till%20a%20later%20step%3B%20once%20it%20works.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EYou%20can%20help%20us%20help%20you%20by%20backing%20up%20and%20describing%20%3CSTRONG%3Ewhat%20the%20purpose%20is%20that's%20being%20served%20here.%3C%2FSTRONG%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%3EWhat%20is%20the%20big%20picture%20into%20which%20this%20fits%3F%20%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EWhat%20is%20the%20spreadsheet%20supposed%20to%20include%3F%20%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EWhere%20does%20data%20come%20from%20in%20the%20first%20place%3F%20%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EWhat's%20supposed%20to%20happen%20with%20it%3F%20%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EThat%20kind%20of%20information.%20%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EBased%20on%20your%20question%2C%20you%20appear%20to%20be%20wanting%20to%20do%20something%20more%20than%20just%20have%20a%20pretty%20sheet%20to%20hang%20on%20a%20bulletin%20board%20somewhere.%20But%20what%20is%20that%20bigger%20something%3F%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3217314%22%20slang%3D%22en-US%22%3ERe%3A%20Lookup%20from%20Bottom%20cell%20to%20Top%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3217314%22%20slang%3D%22en-US%22%3EThank%20you%20for%20your%20response.%20I%20didn't%20realize%20that%20I%20wasn't%20clear%20enough.%20So%20I'll%20edit%20my%20post%20with%20clearer%20explanation.%20I%20didn't%20actually%20format%20anything.%20It%20just%20how%20the%20data%20prepared.%20I%20just%20copied%20it%20as%20is.%20I%20only%20created%20sheet%202%20to%20demonstrate%20what%20I%20need.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3217617%22%20slang%3D%22en-US%22%3ERe%3A%20Lookup%20from%20Bottom%20cell%20to%20Top%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3217617%22%20slang%3D%22en-US%22%3EWhat%20is%20to%20be%20done%20with%20Employee%204%20who%20appears%20in%20ALL%20groups%2C%20BOTH%20shifts%20and%20ALMOST%20EVERY%20Lunch%20time.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3218663%22%20slang%3D%22en-US%22%3ERe%3A%20Lookup%20from%20Bottom%20cell%20to%20Top%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3218663%22%20slang%3D%22en-US%22%3EI%20don't%20get%20it.%20You're%20lazy%20and%20you%20expect%20someone%20else%20to%20use%20their%20time%20to%20help%20you.%3CBR%20%2F%3EIf%20you%20want%20help%2C%20provide%20a%20real%20example%20of%20the%20data%20taken%20directly%20from%20the%20email%20message.%20You%20also%20need%20to%20confirm%20that%20the%20layout%20will%20be%20IDENTICAL%20each%20time%20a%20new%20email%20with%20the%20data%20is%20received.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3218668%22%20slang%3D%22en-US%22%3ERe%3A%20Lookup%20from%20Bottom%20cell%20to%20Top%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3218668%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1142876%22%20target%3D%22_blank%22%3E%40kheldar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20wrote%3A%26nbsp%3B%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%3CEM%3EThe%20data%20comes%20from%20an%20e-mail.%20It's%20how%20it's%20formatted%20in%20the%20e-mail.%20And%20copied%20as%20is%20in%20the%20file.%20Again%20it'll%20always%20be%20in%20the%20same%20format%20as%20I%20uploaded%20in%20the%20sample.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EAnd%20before%20we%20go%20any%20further%2C%20I%20need%20to%20ask--which%20is%20what%20I'd%20do%20if%20we%20were%20sitting%20down%20face-to-face--whether%20there's%20any%20possibility%20to%20change%20that%20source%20data%3F%20Frankly%2C%20that's%20what%20I'd%20want%20to%20do.%20That%20%3CSTRONG%3Ecurrent%20array%20of%20colorful%20data%20is%20just%20not%20laid%20out%20in%20a%20manner%20that%20makes%20it%20readily%20searchable%20for%20what%20you%20are%20wanting%20to%20retrieve%2C%3C%2FSTRONG%3E%20described%20in%20this%20sentence%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%3CEM%3ESo%2C%20in%20another%20sheet%2C%20I'll%20enter%20employee's%20name%20then%20I%20need%20to%20look%20up%20their%20lunch%20hour%2C%20shift%20and%20team.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI'll%20grant%20you%20that%20it's%20arrayed%20in%20such%20a%20manner%20that%20it%20is%20%3CEM%3E%3CU%3Esomewhat%3C%2FU%3E%20appealing%20for%20a%20%3CU%3Ehuman%3C%2FU%3E%3C%2FEM%3E%20to%20look%20at%20%2C%20going%20in%20reverse--knowing%20their%20Team%20(and%20name)%20already%2C%20using%20that%20to%20find%20their%20own%20lunch%20break.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EBut%20going%20in%2C%20via%20Excel%2C%20starting%20with%20the%20name%20(as%20you%20are%20seeking%20to%20do)%20and%20finding%20the%20team%20and%20lunch%20hour....%20that's%20a%20different%20task%2C%20a%20task%20for%20which%20this%20is%20%3CEM%3Enot%20at%20all%3C%2FEM%3E%20a%20helpful%20array.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EHence%20my%20question%3A%3CSTRONG%3E%20is%20there%26nbsp%3Bany%20possibility%20to%20change%20that%20source%20data%3F%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%3CSPAN%3EDo%20you%26nbsp%3Bknow%20how%20it's%20generated%20in%20the%20first%20place%3F%20Is%20there%20a%20database%26nbsp%3B%3C%2FSPAN%3Esomewhere%2C%20and%20an%20extraction%20routine%20running%20on%20that%20database%20to%20produce%20this%20layout%3F%20Could%20you%20(we)%20get%20back%20to%20that%20original%20source%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hello,

 

I am once again in need your expertise.

 

I've got a specific table format.

 

I need to lookup the value(will be located at the top) of a cell that is located at the bottom. Another thing to note that, I'll be looking up multiple values from bottom to top and at the top two of the ranges will be merged.

 

I have been trying to solve this on my own but I have failed. All the solutions I've encountered work with from top to bottom.

 

I'm attaching a sample workbook to show you what I need.

 

Edit to make it clearer as per suggested:

 

A note: all the employee names will be unique I was just lazy to change all the names. Sorry for that. So we can assume that Employee 4 and others have unique names.

In the sample file, employees' teams, lunch hours and shift is listed. It's how we get the data. It'll always be in this format. Since, almost all of the people who will use the file are not really good at Excel, I want to keep it as simple as possible for them. They just have to copy paste it from the source and the source is exactly in that format.

 

So, in another sheet, I'll enter employee's name then I need to look up their lunch hour, shift and team. Shift portion is listed at the top. For example "QUEUE ASSIGNMENT FOR 18:00" which is H1 merged cells. So I need to lookup A1 or H1 depending on the employees assignment.

 

The file will serve a purpose to track employees' working habits. We do content moderation and I'll be performing bunch of other things with the data I want to lookup which I can do by myself. Again all of which I've learnt from experts like you in this community.

 

The spreadsheet will include thousands of raw data which I'll be organizing using other techniques.

 

The data comes from an e-mail. It's how it's formatted in the e-mail. And copied as is in the file. Again it'll always be in the same format as I uploaded in the sample.

 

I really hope I'm clear enough.

 

Once again, I'd really appreciate your help.

 

Thanks in advance.

 

 

 

 

10 Replies

@kheldar 

 

You've had 67 views, but not a single reply. And this one isn't really an answer to your question. Rather, it's a suggestion that you start over and make far more clear what it is that you're trying to do.

I need to lookup the value(will be located at the top) of a cell that is located at the bottom.

Huh?! That sentence alone makes no sense. Could you give the specific here...what is the value, and where is it? Which value that is "at the top of a cell at the bottom"--??

 

I will offer one observation that is extremely important: you have spent a LOT of time making this spreadsheet colorful; some might call it "pretty," which might be appropriate at some point. But of greater importance is creating something that, you  know, actually works, actually functions. Leave the fancy coloring and formatting till a later step; once it works.

 

You can help us help you by backing up and describing what the purpose is that's being served here.

  • What is the big picture into which this fits?
  • What is the spreadsheet supposed to include?
  • Where does data come from in the first place?
  • What's supposed to happen with it?
  • That kind of information.
  • Based on your question, you appear to be wanting to do something more than just have a pretty sheet to hang on a bulletin board somewhere. But what is that bigger something?

Thank you for your response. I really appreciate you taking your time to give a detailed answer. I didn't realize that I wasn't clear enough. So I've just edited my post with clearer explanation. I didn't actually format anything. It just how the source data is prepared. I just copied it as is. I only created sheet 2 to demonstrate what I need.

What is to be done with Employee 4 who appears in ALL groups, BOTH shifts and ALMOST EVERY Lunch time.

I@Doug_Robbins_Word_MVP 

 

I was just lazy to change all the names They will all of course have different names. So we can assume every employee is unique.

I don't get it. You're lazy and you expect someone else to use their time to help you.
If you want help, provide a real example of the data taken directly from the email message. You also need to confirm that the layout will be IDENTICAL each time a new email with the data is received.

@kheldar 

You wrote: 

The data comes from an e-mail. It's how it's formatted in the e-mail. And copied as is in the file. Again it'll always be in the same format as I uploaded in the sample.

And before we go any further, I need to ask--which is what I'd do if we were sitting down face-to-face--whether there's any possibility to change that source data? Frankly, that's what I'd want to do. That current array of colorful data is just not laid out in a manner that makes it readily searchable for what you are wanting to retrieve, described in this sentence:

So, in another sheet, I'll enter employee's name then I need to look up their lunch hour, shift and team.

I'll grant you that it's arrayed in such a manner that it is somewhat appealing for a human to look at , going in reverse--knowing their Team (and name) already, using that to find their own lunch break.

 

But going in, via Excel, starting with the name (as you are seeking to do) and finding the team and lunch hour.... that's a different task, a task for which this is not at all a helpful array.

 

Hence my question: is there any possibility to change that source data?

Do you know how it's generated in the first place? Is there a database somewhere, and an extraction routine running on that database to produce this layout? Could you (we) get back to that original source?

 

 

I didn't think It'd matter that's why I was lazy. But I should have made it clearer. You are right. It's important not to skip these kinds of details. I was just too much focused on my point of view rather than what others would think. Since I'm know every detail about my job, I couldn't think that someone would need that kind of detailed. I was wrong.

Yes the layout will be identical every time a new e-mail is sent.
best response confirmed by kheldar (Contributor)
Solution

Unfortunately, it's not possible to change the data source format as my colleagues would refuse that. It's prepared in Excel and pasted into Outlook. However, as I have gathered from all your comments that It's really difficult to perform such a task, I have come up with my own solution. It's not ideal and requires lots of labor which is against Excel's nature and I wanted to avoid that and that's why I asked you experts to step in. My observation has been that in programming, there is always a solution to everything but It's not always that easy.

My solution:

Since the data source will always be in the same format,  I'm creating direct cell references in another sheet and organizing the table in a vlookup or index match friendly way. It's a lot of work and not really ideal but it's a solution.

@kheldar 

You wrote:

Unfortunately, it's not possible to change the data source format as my colleagues would refuse that.

 

To which I'd suggest that maybe "colleagues" is the wrong term, since it usually implies a degree of collegiality or cooperation in the advancement toward shared outcomes. Doesn't require that, however, so you can continue describing them that way. Or maybe you could build on it and see if they would, in fact, be able to be flexible and collegial.....   Of course, it all depends on how important your task is in the grand scheme of things.

 

You also wrote of your solution:

Since the data source will always be in the same format,  I'm creating direct cell references in another sheet and organizing the table in a vlookup or index match friendly way. It's a lot of work and not really ideal but it's a solution.

 

Actually, if your colleagues won't flex their format, your solution is quite reasonable, so long as the data is always in the same format, with no additional rows or columns ever being added.

Your solution sounds familiar to the one that I would have been proposing and if it was done in the right way, when a new set of data is received, if you paste it into the workbook in which you have setup your solution, you will not need to repeat that manual work.