HLOOKUP problem, help appreciated

  • Thread starter Thread starter Mark Stephens
  • Start date Start date
M

Mark Stephens

I am using hlookup to locate a value in a spreadsheet. Here is the function
typed into the cell:

=MATCH(MAX(Sheets(1)!A:A),Sheets(2)!A1:H1000,0)

If I type in the row number instead of the max function then I get the
correct value so what's happening is I am getting the value contained in the
cell (maximum value) of column A rather than the row value.

I think I should possibly use the match function instead but that wont work
either so how do I return the row number containing the maximum value in
column A of my sheet containing the array rather than the actual value
(Address?).

Any help much appreciated.

Kind regards, Mark
 
Mark,

Your formula
=MATCH(MAX(Sheets(1)!A:A),Sheets(2)!A1:H1000,0)
is looking for the row number on Sheets(2) that contains an exact match to
Max(Sheets(1)!A:A),
only if Sheets(2) contains that value.

Also - formulas don't work with "Sheets(1)" & "Sheets(2)" (those work in
code)
Replace them with the actual sheet name, Like "Sheet1" or "Sheet2" or
"MySheet" or ....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top