Lookup, Where Cell/Selection needed could be in Cell above or below Lookup

Grunter31

Board Regular
Joined
Mar 11, 2017
Messages
53
Office Version
  1. 365
Platform
  1. Windows
I'm trying to set up a daily fixture.

On Sheet 2 I have set up a web query to bring in the daily fixture. It sits in Column A, Row 33 - 76. Its in groups of 2 with a blank cell between each group.

On Sheet 1 is where all the relevant formulas are.

Its impossible to get the web query in Sheet 1 (even though that would solve my issue but it can't be done)

So what I'm trying to do is on Sheet 1

A15 Selection A
A16 Blank Cell

A30 Selection B
A31 Blank Cell

I need to fill "Blank Cell" from the Daily Fixture.

I've tried Vlookup but the selection on Sheet 2 I need could be above or below the Lookup. There are blank cells between the 2 selection on Sheet 2.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hello,

As an initial step, have you tried to use the match() function to locate the row number in Sheet 2 ?
 
Upvote 0
I've tried, VLookup, Match, Index etc. I can get formula to work but only 1 way. Either below the lookup cell or above the lookup cell.
So basically what I need to do is Find referenced cell and look below if there is a name in that cell great use that cell, if the cell is Blank then look above the referenced cell.

It may well be a simple Match Index and I'm missing something.
 
Upvote 0
Quite strange ...

Are you dealing with Merged cells ???
 
Upvote 0
You will admit ... that without seeing your worksheet ... the challenge becomes extremely difficult ...!!! :wink:
 
Upvote 0
Sorry if I did I didn't mean to sound rude. At the moment not near my laptop just on phone.

If you place selection A in Sheet 1 Cell A4 and on Sheet 2 place Selection A in Cell A10 and Selection B in Cell A11, Selection C in Cell A13 and Selection D in Cell A14.

I need Selection B from Sheet 2 to show up in Sheet 1 Cell C5

The problem is that in Sheet 2 selections ABCD all could be matched against each other in any order.
 
Upvote 0
Hello again,

In your Sheet1 in cell C5, you could test following:

Code:
=OFFSET(INDEX(Sheet2!A1:A14,MATCH(A4,Sheet2!A1:A14,0)),1,0)

The pending question is the Offset Value ...1 ...

What could help you determine this value ...?

Hope this will help
 
Last edited:
Upvote 0
What about a second proposal ...

Code:
=OFFSET(INDEX(Sheet2!A10:A14,MATCH($A$4,Sheet2!A10:A14,0)),IF(MATCH($A$4,Sheet2!A10:A14,0)=1,MATCH($A$4,Sheet2!A10:A14,0),4-MATCH($A$4,Sheet2!A10:A14,0)),0)

Hope this will help
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,959
Messages
6,122,476
Members
449,087
Latest member
RExcelSearch

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