How can I change the A1 in the following formula to the cell reference that is stated in B1?
=IF(ISERROR(INDIRECT("'"&TEXT($A10,"dd-mm")&"'!A1"))=TRUE,0,INDIRECT("'"&TEXT($A10,"dd-mm")&"'!A1"))
Indirect?
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Re: Indirect?
Can you not replace "!A1" (including the quotation marks), with INDIRECT(B1)?
Regards
Don
Don
-
- 2StarLounger
- Posts: 112
- Joined: 25 Jan 2010, 20:19
Re: Indirect?
Does this do what you want?
=IF(ISERROR(INDIRECT("'"&TEXT($A10,"dd-mm")&"'!" & B1))=TRUE,0,INDIRECT("'"&TEXT($A10,"dd-mm")&"'!" & B1))
=IF(ISERROR(INDIRECT("'"&TEXT($A10,"dd-mm")&"'!" & B1))=TRUE,0,INDIRECT("'"&TEXT($A10,"dd-mm")&"'!" & B1))
-
- 5StarLounger
- Posts: 1185
- Joined: 24 Jan 2010, 12:02
- Location: Wales, UK.
Re: Indirect?
Finally got there:VegasNath wrote:=IF(ISERROR(INDIRECT("'"&TEXT($A10,"dd-mm")&"'!A1"))=TRUE,0,INDIRECT("'"&TEXT($A10,"dd-mm")&"'!A1"))
=IF(ISERROR(INDIRECT("'"&TEXT($A4,"dd-mm")&"'!A1"))=TRUE,0,INDIRECT("'"&TEXT($A4,"dd-mm")&"'!"&TEXT(B$1,"")&""))
Thanks for the reply Don.
Nathan
There's no place like home.....
There's no place like home.....
-
- 5StarLounger
- Posts: 1185
- Joined: 24 Jan 2010, 12:02
- Location: Wales, UK.
Re: Indirect?
Thanks also Mike, i figured it out a short while ago after much frustration!
Nathan
There's no place like home.....
There's no place like home.....
-
- 5StarLounger
- Posts: 1185
- Joined: 24 Jan 2010, 12:02
- Location: Wales, UK.
Re: Indirect?
Out of curiosity:.....
A4 is a date (15/09/10)
W1 = E51:G51
W2 = E57:G57
W4 = =IF(ISERROR(INDIRECT("'"&TEXT($A4,"dd-mm")&"'!A1"))=TRUE,0,SUM(INDIRECT("'"&TEXT($A4,"dd-mm")&"'!"&TEXT(W$1,"")&""),INDIRECT("'"&TEXT($A4,"dd-mm")&"'!"&TEXT(W$2,"")&"")))
This works and provides the sum of E51:G51,E57:G57 from worksheet 15-09
However, Is it possible to concatenate the strings from W1:W2 into "E51:G51,E57:G57" (one cell) and therefore simplify the formula in W4 without having to sum various ranges separately?
A4 is a date (15/09/10)
W1 = E51:G51
W2 = E57:G57
W4 = =IF(ISERROR(INDIRECT("'"&TEXT($A4,"dd-mm")&"'!A1"))=TRUE,0,SUM(INDIRECT("'"&TEXT($A4,"dd-mm")&"'!"&TEXT(W$1,"")&""),INDIRECT("'"&TEXT($A4,"dd-mm")&"'!"&TEXT(W$2,"")&"")))
This works and provides the sum of E51:G51,E57:G57 from worksheet 15-09
However, Is it possible to concatenate the strings from W1:W2 into "E51:G51,E57:G57" (one cell) and therefore simplify the formula in W4 without having to sum various ranges separately?
Nathan
There's no place like home.....
There's no place like home.....
-
- 5StarLounger
- Posts: 818
- Joined: 24 Jan 2010, 15:56
Re: Indirect?
No, because you need the sheet name for each part. The TEXT function is unnecessary though around W1 and W2.
Regards,
Rory
Rory
-
- 5StarLounger
- Posts: 1185
- Joined: 24 Jan 2010, 12:02
- Location: Wales, UK.