Posted to microsoft.public.excel.misc
|
|
Grabbing Formula Information from Another Cell
Alright, will try.
Didn't even know how to Google search for what I was looking for!
Thanks,
rjb
"Max" wrote:
An example taken from my recent response to another OP,
which uses INDIRECT & OFFSET to provide the flexibility:
Illustrated in this sample:
http://www.freefilehosting.net/download/3k364
Summarizing 6 sheets.xls
In Total,
Put in C3:
=SUMPRODUCT((INDIRECT("'"&C$1&"'!A2:A200")=$A3)*(I NDIRECT("'"&C$1&"'!B2:B200")=$B3)*OFFSET(INDIRECT( "'"&C$1&"'!B2:B200"),,MATCH(C$2,INDIRECT("'"&C$1&" '!1:1"),0)-2,))
Copy C3 across to H3, fill down as far as required. Adapt the ranges to suit.
Notes: As detailed in the sample, a complete listing of codes & descriptions
is assumed in A3:B3 down. Sheetnames are listed in C1:H1, cities in C2:H2
like this:
Jan Feb Jan Feb Jan Feb
Atlanta Atlanta Chicago Chicago Detroit Detroit
------ ---
Adapt the example to suit ..
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,200 Files:354 Subscribers:53
xdemechanik
---
"RJB" wrote:
In other words... I have a file with a Worksheet for every sales district.
I'd like a combination table on one sheet that sumproducts several rows of
info, with one column per sales district.
Is there a way to write the formula where it will grab the information from
a sheet, if I name my column headings after the sheets?
In other words, my Worksheet tab name is "East", "West", "South", etc.
My formula in B2is =SUMPRODUCT((EAST!J12450:J13450),...etc.)
and in C2
=SUMPRODUCT((WEST!J12450:J13450),...etc.)
Can I set it so if cell B1="EAST", and C1 is "WEST", I can use the exact
same formula in B2 and C2?
|