PC Review


Reply
Thread Tools Rate Thread

Adding contents of a cell as the worksheet reference in a formula

 
 
Miner Jeff
Guest
Posts: n/a
 
      11th Jun 2007
Here's the dilemma:

In each cell of column 1of worksheet 1, I want a formula of the form:

='target worksheet tabname'!A1

In the cells of column 2 of worksheet 1, I have 'target worksheet
tabname' entries.

How would I embed the text from the column 2 cells into the formula of
the column 1 cells?

I tried concatenating parts of the formula (both with 'concatenate'
and ampersand option) but couldn't make it work. (concatenate
appeared to work but to make it return the result from the target
worksheet, I had to enter the cursor in the formula cell and hit
enter)

Thanks,

Jeff

 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      11th Jun 2007
I'm not sure I understand what you mean, but if you've got worksheet
names in column 2, then you can use

=INDIRECT(B1 & "!A1")

(assuming that the single quotes are in B1. If not:

=INDIRECT("'" & B1 & "'!A1")

In article <(E-Mail Removed)>,
Miner Jeff <(E-Mail Removed)> wrote:

> Here's the dilemma:
>
> In each cell of column 1of worksheet 1, I want a formula of the form:
>
> ='target worksheet tabname'!A1
>
> In the cells of column 2 of worksheet 1, I have 'target worksheet
> tabname' entries.
>
> How would I embed the text from the column 2 cells into the formula of
> the column 1 cells?
>
> I tried concatenating parts of the formula (both with 'concatenate'
> and ampersand option) but couldn't make it work. (concatenate
> appeared to work but to make it return the result from the target
> worksheet, I had to enter the cursor in the formula cell and hit
> enter)
>
> Thanks,
>
> Jeff

 
Reply With Quote
 
Miner Jeff
Guest
Posts: n/a
 
      13th Jun 2007
On Jun 11, 5:05 pm, JE McGimpsey <jemcgimp...@mvps.org> wrote:
> I'm not sure I understand what you mean, but if you've got worksheet
> names in column 2, then you can use
>
> =INDIRECT(B1 & "!A1")
>
> (assuming that the single quotes are in B1. If not:
>
> =INDIRECT("'" & B1 & "'!A1")
>
> In article <1181599065.916513.200...@g4g2000hsf.googlegroups.com>,
> MinerJeff <jeff.p.bled...@lmco.com> wrote:
>
>
>
> > Here's the dilemma:

>
> > In each cell of column 1of worksheet 1, I want a formula of the form:

>
> > ='target worksheet tabname'!A1

>
> > In the cells of column 2 of worksheet 1, I have 'target worksheet
> > tabname' entries.

>
> > How would I embed the text from the column 2 cells into the formula of
> > the column 1 cells?

>
> > I tried concatenating parts of the formula (both with 'concatenate'
> > and ampersand option) but couldn't make it work. (concatenate
> > appeared to work but to make it return the result from the target
> > worksheet, I had to enter the cursor in the formula cell and hit
> > enter)

>
> > Thanks,

>
> > Jeff- Hide quoted text -

>
> - Show quoted text -


JE,

Thanks for the help. Your first suggestion worked. I was hoping the
solution would solve my 'bigger' problem but now I'm not so sure.

Here's the real problem I'm trying to solve:

In the formula,

=IF(AND($D402="INPUT",
$H402="INTERLOCK")=TRUE,VLOOKUP($W402,'1260-17A_SLOT_1'!$A$2:$F
$81,2,FALSE)&"-"&VLOOKUP($W402,'1260-17A_SLOT_1'!$A$2:$F
$81,5,FALSE),IF(AND($D402="INPUT",$J402="")=TRUE,VLOOKUP($I402,$B$2:$M
$5000,12,FALSE),IF(AND(LEFT($L402,10)="DTS E1459A",
$J402="")=TRUE,VLOOKUP($I402,$B$2:$M$5000,12,FALSE),"")))

do you know how can I use your INDIRECT solution to refer to
'1260-17A_SLOT_1', where '1260-17A_SLOT_1' is contained in a cell
adjacent to the formula's cell, or at least on the same row ?

Thanks again,

Jeff

 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      13th Jun 2007
One way:

=IF(AND($D402="INPUT", $H402="INTERLOCK")=TRUE,
VLOOKUP($W402,INDIRECT("'" & X & "'!A2:F81"), 2, FALSE) & "-" &
VLOOKUP($W402,INDIRECT("'" & X & "'!A2:F81"), 5, FALSE),
IF(AND($D402="INPUT", $J402="")=TRUE, VLOOKUP($I402, $B$2:$M$5000, 12,
FALSE), IF(AND(LEFT($L402, 10)="DTS E1459A", $J402="")=TRUE,
VLOOKUP($I402, $B$2:$M$5000, 12, FALSE), "")))

Where X is your adjacent cell

In article <(E-Mail Removed)>,
Miner Jeff <(E-Mail Removed)> wrote:

> Here's the real problem I'm trying to solve:
>
> In the formula,
>
> =IF(AND($D402="INPUT",
> $H402="INTERLOCK")=TRUE,VLOOKUP($W402,'1260-17A_SLOT_1'!$A$2:$F
> $81,2,FALSE)&"-"&VLOOKUP($W402,'1260-17A_SLOT_1'!$A$2:$F
> $81,5,FALSE),IF(AND($D402="INPUT",$J402="")=TRUE,VLOOKUP($I402,$B$2:$M
> $5000,12,FALSE),IF(AND(LEFT($L402,10)="DTS E1459A",
> $J402="")=TRUE,VLOOKUP($I402,$B$2:$M$5000,12,FALSE),"")))
>
> do you know how can I use your INDIRECT solution to refer to
> '1260-17A_SLOT_1', where '1260-17A_SLOT_1' is contained in a cell
> adjacent to the formula's cell, or at least on the same row ?

 
Reply With Quote
 
Miner Jeff
Guest
Posts: n/a
 
      13th Jun 2007
On Jun 13, 12:30 pm, JE McGimpsey <jemcgimp...@mvps.org> wrote:
> One way:
>
> =IF(AND($D402="INPUT", $H402="INTERLOCK")=TRUE,
> VLOOKUP($W402,INDIRECT("'" & X & "'!A2:F81"), 2, FALSE) & "-" &
> VLOOKUP($W402,INDIRECT("'" & X & "'!A2:F81"), 5, FALSE),
> IF(AND($D402="INPUT", $J402="")=TRUE, VLOOKUP($I402, $B$2:$M$5000, 12,
> FALSE), IF(AND(LEFT($L402, 10)="DTS E1459A", $J402="")=TRUE,
> VLOOKUP($I402, $B$2:$M$5000, 12, FALSE), "")))
>
> Where X is your adjacent cell
>
> In article <1181744599.996959.57...@g37g2000prf.googlegroups.com>,
> Miner Jeff <jeff.p.bled...@lmco.com> wrote:
>
>
>
> > Here's the real problem I'm trying to solve:

>
> > In the formula,

>
> > =IF(AND($D402="INPUT",
> > $H402="INTERLOCK")=TRUE,VLOOKUP($W402,'1260-17A_SLOT_1'!$A$2:$F
> > $81,2,FALSE)&"-"&VLOOKUP($W402,'1260-17A_SLOT_1'!$A$2:$F
> > $81,5,FALSE),IF(AND($D402="INPUT",$J402="")=TRUE,VLOOKUP($I402,$B$2:$M
> > $5000,12,FALSE),IF(AND(LEFT($L402,10)="DTS E1459A",
> > $J402="")=TRUE,VLOOKUP($I402,$B$2:$M$5000,12,FALSE),"")))

>
> > do you know how can I use your INDIRECT solution to refer to
> > '1260-17A_SLOT_1', where '1260-17A_SLOT_1' is contained in a cell
> > adjacent to the formula's cell, or at least on the same row ?- Hide quoted text -

>
> - Show quoted text -


Thanks JE. It works. This is a big help. This is my first
experience with embedding functions inside of other functions.

Jeff

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use cell contents to make formula reference Sherri Microsoft Excel Programming 4 20th Apr 2010 02:08 AM
using contents of cell to name a worksheet reference =?Utf-8?B?SWFu?= Microsoft Excel Discussion 1 8th Apr 2006 04:50 PM
Adding the contents of a cell to a formula =?Utf-8?B?UGF1bCBCb25k?= Microsoft Excel Misc 1 21st Jan 2006 07:19 PM
Using cell contents to reference worksheet names timsantiago Microsoft Excel Misc 5 8th Nov 2005 09:40 PM
Reference worksheet by using contents of cell as worksheet name macummi Microsoft Excel Misc 2 31st Oct 2003 12:53 PM


Features
 

Advertising
 

Newsgroups
 


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