Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Lookup variabel field in variabel sheet

Hello,

First I would like to wish you all the best for 2008!

I am struggling with the following: I have a worksheet with over 20
difference trial balances, to make life easier I am making a summary
sheet that shows me only the data I am looking for. As the position of
the individual trial balances and their format tends to change through
time I have to capture this in my formulas. Could someone advice which
formula to use for:

A B
C
1 HKVH DIVIDENDS RECEIVABLE --RESULT--

I am now using =INDIRECT(A1&"!J24") which works fine as long as the
value for 'DIVIDENDS RECEIVABLE' is always in J24.

Any suggestion is most appreciated.

Many thanks

Rgds,
Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 3, 9:39 pm, Robert wrote:
Hello,

First I would like to wish you all the best for 2008!

I am struggling with the following: I have a worksheet with over 20
difference trial balances, to make life easier I am making a summary
sheet that shows me only the data I am looking for. As the position of
the individual trial balances and their format tends to change through
time I have to capture this in my formulas. Could someone advice which
formula to use for:

A B
C
1 HKVH DIVIDENDS RECEIVABLE --RESULT--

I am now using =INDIRECT(A1&"!J24") which works fine as long as the
value for 'DIVIDENDS RECEIVABLE' is always in J24.

Any suggestion is most appreciated.

Many thanks

Rgds,
Robert


What changes, the column, the row or both?

Ken Johnson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Lookup variabel field in variabel sheet

Hi Ken,
Only the row changes.
Thanks
Rgds,
Robert
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 3, 11:03 pm, Robert wrote:
Hi Ken,
Only the row changes.
Thanks
Rgds,
Robert


Assuming DIVIDENDS RECEIVABLE is a number then maybe...

=INDIRECT(A1&"!J" & MATCH(9.99E+307,J:J))

Ken Johnson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 3, 11:26 pm, Ken Johnson wrote:
On Jan 3, 11:03 pm, Robert wrote:

Hi Ken,
Only the row changes.
Thanks
Rgds,
Robert


Assuming DIVIDENDS RECEIVABLE is a number then maybe...

=INDIRECT(A1&"!J" & MATCH(9.99E+307,J:J))

Ken Johnson


I have of course assumed that DIVIDENDS RECEIVED is the last entry in
column J on each of the 20 sheets.
I hope this is a correct assumption.

Ken Johnson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Lookup variabel field in variabel sheet

What exactly do you mean with 9.99E+307?
You can assume that DIVIDENDS RECEIVED always lies within the range
J1:J100

Robert
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 3, 11:53 pm, Robert wrote:
What exactly do you mean with 9.99E+307?
You can assume that DIVIDENDS RECEIVED always lies within the range
J1:J100

Robert


I assumed that DIVIDENDS RECEIVED would be the bottom-most entry in
column J.
The likelihood that the actual value of DIVIDENDS RECEIVED would be
equal to or greater than 9.99E+307 is essentially zero, otherwise you
are working for the richest person in the universe! (9.99E+307 is the
largest number that excel can deal with) .
So, when the MATCH function goes looking for the row in column J
containing 9.99E+307 it doesn't find it and it returns instead the
number of elements in the range. With the range set at J:J, MATCH
returns the row containing DIVIDENDS RECEIVED, but only if DIVIDENDS
RECEIVED is the bottom-most entry in column J.

Is DIVIDENDS RECEIVED the bottom-most column J entry on your sheets?

Ken Johnson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 4, 12:29 am, Ken Johnson wrote:
On Jan 3, 11:53 pm, Robert wrote:

What exactly do you mean with 9.99E+307?
You can assume that DIVIDENDS RECEIVED always lies within the range
J1:J100


Robert


I assumed that DIVIDENDS RECEIVED would be the bottom-most entry in
column J.
The likelihood that the actual value of DIVIDENDS RECEIVED would be
equal to or greater than 9.99E+307 is essentially zero, otherwise you
are working for the richest person in the universe! (9.99E+307 is the
largest number that excel can deal with) .
So, when the MATCH function goes looking for the row in column J
containing 9.99E+307 it doesn't find it and it returns instead the
number of elements in the range. With the range set at J:J, MATCH
returns the row containing DIVIDENDS RECEIVED, but only if DIVIDENDS
RECEIVED is the bottom-most entry in column J.

Is DIVIDENDS RECEIVED the bottom-most column J entry on your sheets?

Ken Johnson


Oops! RECEIVABLE, not RECEIVED

Ken Johnson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Lookup variabel field in variabel sheet

Dividends received is just one of the 100 difference trial lines and
is currenly located on line 37. The value I am looking for (lookup) is
in column K. I might be mistaking but your formula does not refer to
column K to return a value, is it?

Robert
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 4, 12:38 am, Robert wrote:
Dividends received is just one of the 100 difference trial lines and
is currenly located on line 37. The value I am looking for (lookup) is
in column K. I might be mistaking but your formula does not refer to
column K to return a value, is it?

Robert


No, it's looking for the bottom-most entry in column J.

Your original formula...

=INDIRECT(A1&"!J24")

refers to column J and you said that only the row changes. I stuck
with column J and assumed that DIVIDENDS RECEIVABLE would be the
bottom-most column J entry, so I added the MATCH function to include
the row number of the bottom-most column J entry.

How does column K fit in to the scheme of things?

Ken Johnson



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Lookup variabel field in variabel sheet

Column K contains amounts which I would like to see in the summary
sheet. Simply said, in the summary sheet I would like to have an
overview which amount of dividends (K) is received per portfolio (A1).
So I have 2 values in the summary sheet on which I would like to apply
the lookup:
1. Portfolio code (match with one of the 20 sheets)
2. Trial item (retrieve the amount from K that of which the name in
column J matches Dividends receivable)

HTH

Robert

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 4, 1:00 am, Robert wrote:
Column K contains amounts which I would like to see in the summary
sheet. Simply said, in the summary sheet I would like to have an
overview which amount of dividends (K) is received per portfolio (A1).
So I have 2 values in the summary sheet on which I would like to apply
the lookup:
1. Portfolio code (match with one of the 20 sheets)
2. Trial item (retrieve the amount from K that of which the name in
column J matches Dividends receivable)

HTH

Robert


Let's see if I'm following.
You want a formula that will find the text "Dividends Receivable" in
column J, then look across to column K and return that column K value
on the same row.

Is that right?

Ken Johnson
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Lookup variabel field in variabel sheet

Exact!;-)
  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 4, 1:14 am, Ken Johnson wrote:
On Jan 4, 1:00 am, Robert wrote:

Column K contains amounts which I would like to see in the summary
sheet. Simply said, in the summary sheet I would like to have an
overview which amount of dividends (K) is received per portfolio (A1).
So I have 2 values in the summary sheet on which I would like to apply
the lookup:
1. Portfolio code (match with one of the 20 sheets)
2. Trial item (retrieve the amount from K that of which the name in
column J matches Dividends receivable)


HTH


Robert


Let's see if I'm following.
You want a formula that will find the text "Dividends Receivable" in
column J, then look across to column K and return that column K value
on the same row.

Is that right?

Ken Johnson


If I am right, which will be a bloody miracle, then try...

=INDIRECT(A1&"!K"&MATCH("Dividends Receivable",INDIRECT(A1&"!J:J")))

Ken Johnson
  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 4, 1:32 am, Ken Johnson wrote:
On Jan 4, 1:14 am, Ken Johnson wrote:



On Jan 4, 1:00 am, Robert wrote:


Column K contains amounts which I would like to see in the summary
sheet. Simply said, in the summary sheet I would like to have an
overview which amount of dividends (K) is received per portfolio (A1).
So I have 2 values in the summary sheet on which I would like to apply
the lookup:
1. Portfolio code (match with one of the 20 sheets)
2. Trial item (retrieve the amount from K that of which the name in
column J matches Dividends receivable)


HTH


Robert


Let's see if I'm following.
You want a formula that will find the text "Dividends Receivable" in
column J, then look across to column K and return that column K value
on the same row.


Is that right?


Ken Johnson


If I am right, which will be a bloody miracle, then try...

=INDIRECT(A1&"!K"&MATCH("Dividends Receivable",INDIRECT(A1&"!J:J")))

Ken Johnson


If that formula gave the right result then so will this...

=VLOOKUP("Dividends Receivable",INDIRECT(A1&"!J:K"),2,FALSE)

which is an improvement because it involves only two function calls.

Ken Johnson


  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Lookup variabel field in variabel sheet

GREAT, it works perfect!
Thanks a lot for helping me out!

Rgds,
Robert
  #17   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Lookup variabel field in variabel sheet

On Jan 4, 2:37 am, Robert wrote:
GREAT, it works perfect!
Thanks a lot for helping me out!

Rgds,
Robert


Great!
Thanks for the feedback.

Ken Johnson
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
countif with variabel criteria? Hans Excel Worksheet Functions 2 January 23rd 08 06:57 AM
getting the sum of variabel ranges Hein Excel Worksheet Functions 4 March 26th 06 07:44 PM
Use a variabel Alvin Hansen[_2_] Excel Programming 16 December 10th 04 12:48 PM
Use variabel as reference Andres Angel[_2_] Excel Programming 2 October 4th 04 10:39 PM
Variabel and caption in userform Gary Brown[_7_] Excel Programming 0 September 21st 04 07:59 PM


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