Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 683
Default Using INDIRECT within functions

I learned a bit from JLathman in a previous post but tried to use the same
methodology with this formula (also learned from this Group to get the last
entered value in a column) without much luck.

The original formula was this with 2009 sheet being static:

=LOOKUP(2,1/('2009'!H3:H65536<""),'2009'!H3:H65536)

Trying to make it dynamic I tried the following without success:

=LOOKUP(INDIRECT("2,1/(" & O1 & "!$H$3:$H$65536<"")," & O1 &
"!$H$3:$H$65536)"))

Did I miss something or are the double quotes after the < screwing this up.
If so, what's the correct way around it!

Thanks in advance!


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Using INDIRECT within functions

This seems ok, tested he
=LOOKUP(2,1/(INDIRECT("'"&O1&"'!H3:H65536")<""),INDIRECT("'"& O1&"'!H3:H65536"))
where input in O1 is: 2009
voila? hit the YES below

You wrap INDIRECT to resolve the range bit of it
--
Max
Singapore
---
"Brian" wrote:
I learned a bit from JLathman in a previous post but tried to use the same
methodology with this formula (also learned from this Group to get the last
entered value in a column) without much luck.

The original formula was this with 2009 sheet being static:

=LOOKUP(2,1/('2009'!H3:H65536<""),'2009'!H3:H65536)

Trying to make it dynamic I tried the following without success:

=LOOKUP(INDIRECT("2,1/(" & O1 & "!$H$3:$H$65536<"")," & O1 &
"!$H$3:$H$65536)"))

Did I miss something or are the double quotes after the < screwing this up.
If so, what's the correct way around it!

Thanks in advance!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 683
Default Using INDIRECT within functions

Thanks - didn't realize it should be used twice in the formula. It makes
sense though.

"Max" wrote:

This seems ok, tested he
=LOOKUP(2,1/(INDIRECT("'"&O1&"'!H3:H65536")<""),INDIRECT("'"& O1&"'!H3:H65536"))
where input in O1 is: 2009
voila? hit the YES below

You wrap INDIRECT to resolve the range bit of it
--
Max
Singapore
---
"Brian" wrote:
I learned a bit from JLathman in a previous post but tried to use the same
methodology with this formula (also learned from this Group to get the last
entered value in a column) without much luck.

The original formula was this with 2009 sheet being static:

=LOOKUP(2,1/('2009'!H3:H65536<""),'2009'!H3:H65536)

Trying to make it dynamic I tried the following without success:

=LOOKUP(INDIRECT("2,1/(" & O1 & "!$H$3:$H$65536<"")," & O1 &
"!$H$3:$H$65536)"))

Did I miss something or are the double quotes after the < screwing this up.
If so, what's the correct way around it!

Thanks in advance!


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Using INDIRECT within functions

Welcome. As mentioned, we wrap INDIRECT to resolve the ranges part of it,
where ranges would be textstrings formed via concats (using the & operator)
pointing to cells housing the sheetnames, etc for flexibility.
--
Max
Singapore
---
"Brian" wrote:
Thanks - didn't realize it should be used twice in the formula. It makes
sense though.

"Max" wrote:

This seems ok, tested he
=LOOKUP(2,1/(INDIRECT("'"&O1&"'!H3:H65536")<""),INDIRECT("'"& O1&"'!H3:H65536"))
where input in O1 is: 2009
voila? hit the YES below

You wrap INDIRECT to resolve the range bit of it
--
Max
Singapore
---
"Brian" wrote:
I learned a bit from JLathman in a previous post but tried to use the same
methodology with this formula (also learned from this Group to get the last
entered value in a column) without much luck.

The original formula was this with 2009 sheet being static:

=LOOKUP(2,1/('2009'!H3:H65536<""),'2009'!H3:H65536)

Trying to make it dynamic I tried the following without success:

=LOOKUP(INDIRECT("2,1/(" & O1 & "!$H$3:$H$65536<"")," & O1 &
"!$H$3:$H$65536)"))

Did I miss something or are the double quotes after the < screwing this up.
If so, what's the correct way around it!

Thanks in advance!


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using INDIRECT within functions

=LOOKUP(2,1/('2009'!H3:H65536<""),'2009'!H3:H65536)

Are you wanting the last entry in the range of a *specific* data type? Do
you want the last numeric value in the range? Do you want the last text
value in the range? Or, as your formula will do, do want the last entry in
the range whether it's numeric or text?

If you want a *specific* data type then there are more efficient ways to do
it.

--
Biff
Microsoft Excel MVP


"Brian" wrote in message
...
I learned a bit from JLathman in a previous post but tried to use the same
methodology with this formula (also learned from this Group to get the
last
entered value in a column) without much luck.

The original formula was this with 2009 sheet being static:

=LOOKUP(2,1/('2009'!H3:H65536<""),'2009'!H3:H65536)

Trying to make it dynamic I tried the following without success:

=LOOKUP(INDIRECT("2,1/(" & O1 & "!$H$3:$H$65536<"")," & O1 &
"!$H$3:$H$65536)"))

Did I miss something or are the double quotes after the < screwing this
up.
If so, what's the correct way around it!

Thanks in advance!






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
Allow EXCEL INDIRECT(ADDRESS()) and INDIRECT(RANGE()) functions Mike Barlow Excel Worksheet Functions 7 May 21st 23 07:42 PM
How to use Indirect functions? Eric Excel Discussion (Misc queries) 3 November 12th 08 07:34 AM
INDIRECT & VLOOKUP functions Tanya Excel Worksheet Functions 4 October 26th 07 04:51 AM
row-indirect functions [email protected] Excel Discussion (Misc queries) 3 February 28th 06 11:01 PM
Offset and Indirect functions Thrava Excel Discussion (Misc queries) 4 December 23rd 04 05:07 PM


All times are GMT +1. The time now is 07:46 AM.

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

About Us

"It's about Microsoft Excel"