Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default HLOOKUP problem, help appreciated

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default HLOOKUP problem, help appreciated

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 ....

--
steveB

Remove "AYN" from email to respond
"Mark Stephens" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HLOOKUP PROBLEM mmcap Excel Worksheet Functions 4 November 27th 08 03:24 AM
hlookup problem Desperate Excel Discussion (Misc queries) 3 August 14th 08 07:24 PM
.. any help appreciated .. i think it's a pasting HTML problem. Agent C Excel Discussion (Misc queries) 1 January 26th 06 09:49 PM
Thorny VBA problem. Any creative solution appreciated. [email protected] Excel Programming 3 February 21st 05 09:23 AM
Stubborn Link Data/Value Problem - Help Appreciated! Jax[_2_] Excel Programming 4 January 5th 04 11:53 PM


All times are GMT +1. The time now is 12:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"