- Joined
- Apr 11, 2019
- Messages
- 2
- Reaction score
- 0
Hi
I have been trying to set a non-continuous print area via Function, but I don't seem to be able to get it to work.
I have a defined name for the print area: Print_Area.
To this Name I am able to pass a range eg Sheet1!$E$2:$I$23 and I can dynamically switch to another range using the INDIRECT function based on the values of other cells. For example, as another defined Name: DynPrint
I set:
=IF(Sheet1!$A$3="x",INDIRECT("Sheet1!$E$1:$I$22"),IF(Sheet1!$B$3="x",INDIRECT("Sheet1!$M$1:$Q$22"),INDIRECT("Sheet1!$A$30")))
This switches the print range if A3 is equal to x, or if B3 is equal to x.
However, what I cant seem to work out is if BOTH A3 AND B3 are equal to x, then the Print_Area should be set to Sheet1!$E$1:$I$22,Sheet1!$M$1:$Q$22 However INDIRECT wont accept this, and the Print_Area is cleared.
Any Help would be appreciated.
Thanks
Philip
I have been trying to set a non-continuous print area via Function, but I don't seem to be able to get it to work.
I have a defined name for the print area: Print_Area.
To this Name I am able to pass a range eg Sheet1!$E$2:$I$23 and I can dynamically switch to another range using the INDIRECT function based on the values of other cells. For example, as another defined Name: DynPrint
I set:
=IF(Sheet1!$A$3="x",INDIRECT("Sheet1!$E$1:$I$22"),IF(Sheet1!$B$3="x",INDIRECT("Sheet1!$M$1:$Q$22"),INDIRECT("Sheet1!$A$30")))
This switches the print range if A3 is equal to x, or if B3 is equal to x.
However, what I cant seem to work out is if BOTH A3 AND B3 are equal to x, then the Print_Area should be set to Sheet1!$E$1:$I$22,Sheet1!$M$1:$Q$22 However INDIRECT wont accept this, and the Print_Area is cleared.
Any Help would be appreciated.
Thanks
Philip