hlookup and offset

dmj120

Board Regular
Joined
Jan 5, 2010
Messages
156
I'm trying to combine hlookup() and offset() to find the last value in a row, then go up 2 rows and left 1 cell. Each works independently, but when I try to combine them, errors occur.

=OFFSET(M3,-2,-1) --- "M3" is the below hlookup() reference
=HLOOKUP(9.99999999999999E+307,B3:Y3,1)

Is there a way to accomplish this?
 

Sam_D_Ben

Active Member
Joined
Oct 17, 2012
Messages
381
Something like this.

=HLOOKUP(9.99999999999999E+307,B3:Y3,OFFSET(M3,-2,-1))
 

dmj120

Board Regular
Joined
Jan 5, 2010
Messages
156
Trying something different (after watchin a MrExcel video about vlookup and offset), but now I get a value! error

=OFFSET(B4,0,HLOOKUP(9.99999999999999E+307,C4:Z4,1),-2,-1)
 

Sam_D_Ben

Active Member
Joined
Oct 17, 2012
Messages
381
Something like this,

Code:
=OFFSET(INDEX(B3:I3,1,MATCH(A4,B3:I3,0)),-2,-1)
 

dmj120

Board Regular
Joined
Jan 5, 2010
Messages
156
Thanks, but nothing seems to work.

=OFFSET(HLOOKUP(9.99999999999999E+307,B3:Y3,1),-2,-1) this is essentially what I'm after, but :banghead::banghead: .....is it scotch-thirty yet?
 

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,344
Office Version
365
Platform
Windows
Try:
Excel Workbook
ABCDEFGHIJKLMNOPY
11234567891011121314
2
314252525
Sheet
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
42,250
Office Version
365
Platform
Windows
I would avoid the volatile function OFFSET altogether.
It appears you are working with numerical information, at least in the row where you are looking for the last value, so this should return the required value.

Excel Workbook
ABCDEFGHIJKLMNOPQRSTUVWXY
1C1C2C3C4C5C6C7C8C9C10C11C12C13C14C15C16C17C18C19C20C21C22C23C24C25
2
314252525
4
5
Lookup
 

Forum statistics

Threads
1,082,243
Messages
5,363,972
Members
400,772
Latest member
solbebe

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top