Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ted
 
Posts: n/a
Default how can I imbed sheet names contained in cells into formulas?

I have a spreadsheet which contains a column with account numbers:

ACCT #
1 =SUMIF(SheetReference1,Cell,SheetReference1)
2 =SUMIF(SheetReference2,Cell,SheetReference2)
3 =SUMIF(SheetReference3,Cell,SheetReference3)
4 =SUMIF(SheetReference4,Cell,SheetReference4)



These Account numbers are also the name of sheets.
I need to use the SUMIF function to extract information from each sheet.
However, when I copy paste the formula down I have to manually go into each
cell and change the sheet reference. This can be quite annoying because the
SUMIF function contains the sheet reference twice. If I could imbed the
Account Number as a sheet reference I could save myself a lot of typing....

Does anyone have any suggestions or workarounds?

--
Ted
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Billigmeier
 
Posts: n/a
Default how can I imbed sheet names contained in cells into formulas?

Use the INDIRECT() function. It takes as an argument a string value for a
cell reference. For your example, if your account numbers were in column A,
you could use something like:

=SUMIF(INDIRECT("SheetReference"&A1),Cell)

--
Regards,
Dave


"Ted" wrote:

I have a spreadsheet which contains a column with account numbers:

ACCT #
1 =SUMIF(SheetReference1,Cell,SheetReference1)
2 =SUMIF(SheetReference2,Cell,SheetReference2)
3 =SUMIF(SheetReference3,Cell,SheetReference3)
4 =SUMIF(SheetReference4,Cell,SheetReference4)



These Account numbers are also the name of sheets.
I need to use the SUMIF function to extract information from each sheet.
However, when I copy paste the formula down I have to manually go into each
cell and change the sheet reference. This can be quite annoying because the
SUMIF function contains the sheet reference twice. If I could imbed the
Account Number as a sheet reference I could save myself a lot of typing....

Does anyone have any suggestions or workarounds?

--
Ted

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default how can I imbed sheet names contained in cells into formulas?

Not sure I understand, but I put the following both in sheet2 and sheet3 in
the same range to simulate your account numbers that are the same as sheet
names:
sheet2 10
sheet2 20
sheet2 30
sheet2 40
sheet3 50
sheet3 60
sheet3 70

Then in sheet1 in cells a3 and a4 I put:
sheet2
sheet3
I then put the following formula in b3 and copied down to b4:
=SUMIF(INDIRECT("'" & A3 & "'!a1:a7"),A3,INDIRECT("'" & A3 & "'!b1:b7"))
which returned
100
180
So, if this is what you meant in your question, you should be able to adapt
the formula for your needs.


--
Kevin Vaughn


"Ted" wrote:

I have a spreadsheet which contains a column with account numbers:

ACCT #
1 =SUMIF(SheetReference1,Cell,SheetReference1)
2 =SUMIF(SheetReference2,Cell,SheetReference2)
3 =SUMIF(SheetReference3,Cell,SheetReference3)
4 =SUMIF(SheetReference4,Cell,SheetReference4)



These Account numbers are also the name of sheets.
I need to use the SUMIF function to extract information from each sheet.
However, when I copy paste the formula down I have to manually go into each
cell and change the sheet reference. This can be quite annoying because the
SUMIF function contains the sheet reference twice. If I could imbed the
Account Number as a sheet reference I could save myself a lot of typing....

Does anyone have any suggestions or workarounds?

--
Ted

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
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
Formula to copy rng of cells where (value is met) to anther sheet Exit Advantage Excel Worksheet Functions 3 November 12th 05 02:59 AM
sorting master sheet messes up cells in other sheets linked to it Kt Excel Worksheet Functions 1 October 30th 05 12:25 PM
how get rid of cells with unused formulas Benj Excel Discussion (Misc queries) 3 July 8th 05 02:47 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:50 PM.

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"