Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Referring to a variable cell on another sheet

In a cell on Sheet A, I want to display the value of a cell on Sheet B. I
know the column that it is in (R), but not the row - the row should be equal
the last row in that column which has a nonblank value.

In other words, if the first six rows of column R on Sheet B have values,
then I want to display the value of 'Sheet B'!R6.

I think I can do this using INDIRECT(something) and COUNTA('Sheet B'!R:R),
but I can't seem to fit them together in the correct manner.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 143
Default Referring to a variable cell on another sheet

=LOOKUP(2,1/(SheetB!R1:R65535<""),SheetB!R1:R65535)

Press CTRL+SHIFT+ENTER. not just ENTER.

Hope this helps.
Thanks
Gaurav


"PaladinWhite" wrote in message
...
In a cell on Sheet A, I want to display the value of a cell on Sheet B. I
know the column that it is in (R), but not the row - the row should be
equal
the last row in that column which has a nonblank value.

In other words, if the first six rows of column R on Sheet B have values,
then I want to display the value of 'Sheet B'!R6.

I think I can do this using INDIRECT(something) and COUNTA('Sheet B'!R:R),
but I can't seem to fit them together in the correct manner.

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 143
Default Referring to a variable cell on another sheet

Sorry...this would work even if you press just ENTER. Sorry for the
confusion.


"PaladinWhite" wrote in message
...
In a cell on Sheet A, I want to display the value of a cell on Sheet B. I
know the column that it is in (R), but not the row - the row should be
equal
the last row in that column which has a nonblank value.

In other words, if the first six rows of column R on Sheet B have values,
then I want to display the value of 'Sheet B'!R6.

I think I can do this using INDIRECT(something) and COUNTA('Sheet B'!R:R),
but I can't seem to fit them together in the correct manner.

Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Referring to a variable cell on another sheet

Cool, it works - got a minute to explain HOW in the world it works?

I understand the basic format of LOOKUP() - what are the 65535s and the <""
for?

"Gary" wrote:

Sorry...this would work even if you press just ENTER. Sorry for the
confusion.


"PaladinWhite" wrote in message
...
In a cell on Sheet A, I want to display the value of a cell on Sheet B. I
know the column that it is in (R), but not the row - the row should be
equal
the last row in that column which has a nonblank value.

In other words, if the first six rows of column R on Sheet B have values,
then I want to display the value of 'Sheet B'!R6.

I think I can do this using INDIRECT(something) and COUNTA('Sheet B'!R:R),
but I can't seem to fit them together in the correct manner.

Thanks!




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Referring to a variable cell on another sheet

Ah, wait - it occurs to me that 65,535 is the largest number that can be
represented in unsigned 16-bit binary...

"PaladinWhite" wrote:

Cool, it works - got a minute to explain HOW in the world it works?

I understand the basic format of LOOKUP() - what are the 65535s and the <""
for?

"Gary" wrote:

Sorry...this would work even if you press just ENTER. Sorry for the
confusion.


"PaladinWhite" wrote in message
...
In a cell on Sheet A, I want to display the value of a cell on Sheet B. I
know the column that it is in (R), but not the row - the row should be
equal
the last row in that column which has a nonblank value.

In other words, if the first six rows of column R on Sheet B have values,
then I want to display the value of 'Sheet B'!R6.

I think I can do this using INDIRECT(something) and COUNTA('Sheet B'!R:R),
but I can't seem to fit them together in the correct manner.

Thanks!






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Referring to a variable cell on another sheet

Alright, this problem has become a little bit more complex, and I need some
more help...

I'm working in two cells in SheetA - A2, where this new formula will go, and
A1, which determines A2's value.

I was constrained to Row R of SheetB before - I no longer know the row that
I need beforehand. Instead, I need to do a LOOKUP, checking Row1 of SheetB
for a value that matches the value of cell A1 in the current sheet. Then I
need to return the value of the last nonblank cell in that row (there won't
be any blank cells between filled cells, so the row of the last filled cell
will equal COUNTA(that column)).

So if A1's value is "Purple", and SheetB looks like this:

Blue | Purple | Green
185 | 24812 | 3481
571 | 48194 | 1734
281 | 48194 | 5819
556 | 58602 |

.... I need to return the value 58602.

Thanks again to anyone that takes the time to help me out.

"PaladinWhite" wrote:

Ah, wait - it occurs to me that 65,535 is the largest number that can be
represented in unsigned 16-bit binary...

"PaladinWhite" wrote:

Cool, it works - got a minute to explain HOW in the world it works?

I understand the basic format of LOOKUP() - what are the 65535s and the <""
for?

"Gary" wrote:

Sorry...this would work even if you press just ENTER. Sorry for the
confusion.


"PaladinWhite" wrote in message
...
In a cell on Sheet A, I want to display the value of a cell on Sheet B. I
know the column that it is in (R), but not the row - the row should be
equal
the last row in that column which has a nonblank value.

In other words, if the first six rows of column R on Sheet B have values,
then I want to display the value of 'Sheet B'!R6.

I think I can do this using INDIRECT(something) and COUNTA('Sheet B'!R:R),
but I can't seem to fit them together in the correct manner.

Thanks!



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
Referring to Sheet locations in a formula PCLIVE Excel Worksheet Functions 4 June 30th 07 11:28 PM
Referring to a variable file name Brettjg Excel Discussion (Misc queries) 4 March 3rd 07 11:18 AM
Formula referring to a different sheet luvthavodka Excel Discussion (Misc queries) 1 November 12th 06 10:05 PM
Cell reference - for the sheet name, can I use a variable? Matt Lawson Excel Discussion (Misc queries) 4 December 13th 04 02:31 PM
referring to previous sheet Iolao Excel Discussion (Misc queries) 3 November 26th 04 08:40 PM


All times are GMT +1. The time now is 05:17 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"