Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default using indirect throughout a sheet

qdave, you're welcome.

Yes, ROW(A1) and COLUMN(A1) can be used as incrementers within formulas when
copying down / across. But do tinker with it to ensure that the results
returned are exactly as desired.

For example: =INDIRECT("'Sheet1'!A"&COLUMN(A1))

The above effectively returns a dynamic transpose of Sheet1's col A as we
copy it across. It returns the "vertical" contents of A1,A2,A3 ... etc in
Sheet1, in a horizontal fashion. And sometimes, that's exactly what's
wanted.

But if we wanted it to return Sheet1's A1,B1,C1... as we copy across
we could use instead either:

=INDIRECT("'Sheet1'!"&CHAR(COLUMN(A1)+64)&"1")
above can be copied across 26 cols [returns for cols A - Z]
(there are other, more complex variations to handle beyond col Z)

Instead of the above, a better one might be:
=INDEX(INDIRECT("'Sheet1'!1:1"),COLUMN(A1))
above can be copied / will work right across all 256 cols

or the versatile but volatile:
=OFFSET(INDIRECT("'Sheet1'!A1"),ROW(A1)-1,COLUMN(A1)-1)
which allows "straight-through" copy across and down for "as-is" linking (no
transposing)

Of course, the real flexibility / benefit would be to point to a cell(s) for
the text parts (parts within quotes) within the INDIRECT instead of
hardcoding it as shown in the examples above.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"qdave" wrote in message
...
Thanks Max. Option 2 worked well for modifying formulas along the top of
my
sheet and then dragging them down. I'm assuming I could replace ROW()
with
Column():
use: =INDIRECT("'Sheet1'!A"&ROW(A1))
becomes
use: =INDIRECT("'Sheet1'!A"&COLUMN(A1))

and get the desired result when I drag a formula left to right across a
sheet.
appreicate the tips.

qdave



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
Named Ranges Epinn Excel Worksheet Functions 23 October 16th 06 07:27 AM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
INDIRECT lookup of sheet names Jenny Excel Worksheet Functions 4 May 14th 06 05:35 AM
Using a relative SHEET reference for source data in a chart James Charts and Charting in Excel 6 August 16th 05 05:07 PM
Does excel recognise names rather than cells? Sue Excel Worksheet Functions 9 May 22nd 05 04:51 AM


All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"