Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Rachel_M
 
Posts: n/a
Default cell value as a row number in a function?

Hi, I'm trying to use returned values from VLOOKUP functions as the row
numbers in the range of a max function.

For example the first VLOOKUP gives me 9 and the 2nd VLOOKUP gives me 15,
and I want the maximum of cells B9:B15.
Thanks for any help!
Rachel
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
one way:
=MAX(INDIRECT("B" & VLOOKUP(...#1) & ":B" & VLOOKUP(...#2)))

--
Regards
Frank Kabel
Frankfurt, Germany

"Rachel_M" schrieb im Newsbeitrag
...
Hi, I'm trying to use returned values from VLOOKUP functions as the

row
numbers in the range of a max function.

For example the first VLOOKUP gives me 9 and the 2nd VLOOKUP gives me

15,
and I want the maximum of cells B9:B15.
Thanks for any help!
Rachel


  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way

=MAX(INDEX(B:B,9):INDEX(B:B,15))

replace 9 and 15 with your respective vlookup

can look like this

=MAX(INDEX(B:B,VLOOKUP(E1,Sheet2!A2:B27,2,0)):INDE X(B:B,VLOOKUP(F1,Sheet2!A2:B27,2,0)))



Regards,

Peo Sjoblom




"Rachel_M" wrote:

Hi, I'm trying to use returned values from VLOOKUP functions as the row
numbers in the range of a max function.

For example the first VLOOKUP gives me 9 and the 2nd VLOOKUP gives me 15,
and I want the maximum of cells B9:B15.
Thanks for any help!
Rachel

  #4   Report Post  
Rachel_M
 
Posts: n/a
Default

Thanks! That worked!

"Frank Kabel" wrote:

Hi
one way:
=MAX(INDIRECT("B" & VLOOKUP(...#1) & ":B" & VLOOKUP(...#2)))

--
Regards
Frank Kabel
Frankfurt, Germany

"Rachel_M" schrieb im Newsbeitrag
...
Hi, I'm trying to use returned values from VLOOKUP functions as the

row
numbers in the range of a max function.

For example the first VLOOKUP gives me 9 and the 2nd VLOOKUP gives me

15,
and I want the maximum of cells B9:B15.
Thanks for any help!
Rachel



  #5   Report Post  
Rachel_M
 
Posts: n/a
Default

Thanks to you as well, because that worked too!

"Peo Sjoblom" wrote:

One way

=MAX(INDEX(B:B,9):INDEX(B:B,15))

replace 9 and 15 with your respective vlookup

can look like this

=MAX(INDEX(B:B,VLOOKUP(E1,Sheet2!A2:B27,2,0)):INDE X(B:B,VLOOKUP(F1,Sheet2!A2:B27,2,0)))



Regards,

Peo Sjoblom




"Rachel_M" wrote:

Hi, I'm trying to use returned values from VLOOKUP functions as the row
numbers in the range of a max function.

For example the first VLOOKUP gives me 9 and the 2nd VLOOKUP gives me 15,
and I want the maximum of cells B9:B15.
Thanks for any help!
Rachel



  #6   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

There is a benefit using INDEX contra INDIRECT, it's not volatile so you
want get prompted to save
if you just open and close the workbook and it won't recalculate every time
the sheet recalculates

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"Rachel_M" wrote in message
...
Thanks to you as well, because that worked too!

"Peo Sjoblom" wrote:

One way

=MAX(INDEX(B:B,9):INDEX(B:B,15))

replace 9 and 15 with your respective vlookup

can look like this

=MAX(INDEX(B:B,VLOOKUP(E1,Sheet2!A2:B27,2,0)):INDE X(B:B,VLOOKUP(F1,Sheet2!A2:B27,2,0)))



Regards,

Peo Sjoblom




"Rachel_M" wrote:

Hi, I'm trying to use returned values from VLOOKUP functions as the row
numbers in the range of a max function.

For example the first VLOOKUP gives me 9 and the 2nd VLOOKUP gives me
15,
and I want the maximum of cells B9:B15.
Thanks for any help!
Rachel



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default cell value as a row number in a function?

This was really helpful.

Is there any way I can use the contents of the cell as part of a worksheet
name,such that a hlookup of another sheet could select a different sheet
based on the content of a cell, instead of having to use a long If function?

Cell Contents: No.1, No.2, No.3 or No.4

=HLOOKUP(A68,(INDEX('<cell contents_table'!A:A,(C68*3+2)):INDEX('<cell
contents_table'!Q:Q,41)),((13-C68)*3),FALSE))

Where <cell contents is replaced by with the cell contents?


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default cell value as a row number in a function?

Hi,

Try this

=HLOOKUP(A68,(INDEX("'"&indirect(A2&"_table'!A:A") ,(C68*3+2)):INDEX("'"&indirect(A2&"_table'!Q:Q"),4 1)),((13-C68)*3),FALSE))

A2 holds the sheet name. I have not tested it, but it should work

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Tkydon" wrote in message
...
This was really helpful.

Is there any way I can use the contents of the cell as part of a worksheet
name,such that a hlookup of another sheet could select a different sheet
based on the content of a cell, instead of having to use a long If
function?

Cell Contents: No.1, No.2, No.3 or No.4

=HLOOKUP(A68,(INDEX('<cell contents_table'!A:A,(C68*3+2)):INDEX('<cell
contents_table'!Q:Q,41)),((13-C68)*3),FALSE))

Where <cell contents is replaced by with the cell contents?


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
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
#VALUE in cell but pop up function box show right number Ted Dalton Excel Discussion (Misc queries) 1 December 14th 04 03:15 PM
Formatting a cell as "text" in the number catagory. Ed Excel Worksheet Functions 3 December 7th 04 07:12 PM
multiply by actual number in cell CJ Cerezo Excel Worksheet Functions 3 November 29th 04 09:43 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 11:27 PM.

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"