Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Counting populated cells in another worksheet

I have 3 worksheets, 1 containing data for 2006, one containing data for
2007, and the third is suppose to sum year-to date data from each sheet.
Column A of both data worksheets is populated with Week 1 through Week 52.
Column B of the 2006 worksheet is populated for all the weeks, but for the
2007 worksheet, is only populated for the first 2 weeks. In cell B18 of my
Totals worksheet I have the date of my current week, in this case 1/13/07. I
wanted these formulas to be dynamic so that when the date changes to 2008,
the formulas would reference sheets 2007, and 2008. I nearly had this
figured out, but I cant seem to get around referencing the 2007 worksheet
when I do a COUNTA to determine the number of populated weeks

2006 2007
Columns: A B A
B
Row 1 Direct
Direct
Row 2 New
New
Row 3 Week 1 2 Week 1
5
Row 4 Week 2 4 Week 2
5
Row 5 Week 3 7 Week 3
(Blank)
. . .
. . .

Totals Worksheet
Columns: F G
Row 5 Current Year to Date Previous Year to Date
Row 6 10 6

Here are the formulas I have so far:
Current Year to Date (Cell F6):
=SUM(INDIRECT(ADDRESS(3,ROW(6:6)-4,4,,YEAR($B$18))):INDIRECT(ADDRESS(COUNTA
('2007'!$B:$B),ROW(6:6)-4,4,,YEAR($B$18))))

Previous Year to Date (Cell G6):
=SUM(INDIRECT(ADDRESS(3,ROW(6:6)-4,4,,YEAR($B$18)-1)):INDIRECT(ADDRESS
(COUNTA('2007'!$B:$B),ROW(6:6)-4,4,,YEAR($B$18)-1)))

There is also additional data in column C through E that I wanted to be able
to reference as well by copying the formula down, which is why a reference
the column number as €œROW(6:6)-4€.

Any ideas on how to get around this or am I doing this all wrong to begin
with?

Thanks.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200705/1

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
changing average if cells populated Dave Excel Worksheet Functions 3 March 18th 07 10:14 PM
changing average calc if cells populated Dave Excel Worksheet Functions 0 March 16th 07 09:31 PM
Master Worksheet populated by other Worksheets? Steve Lundwall Excel Worksheet Functions 0 March 3rd 06 01:38 PM
Macro Help: Concatenate Populated Cells in Column A TJM Excel Discussion (Misc queries) 3 June 11th 05 11:25 AM
how do populate empty cells with the contents of populated cells . Jim99 Excel Discussion (Misc queries) 6 April 21st 05 05:44 PM


All times are GMT +1. The time now is 07:16 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"