Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
snax500
 
Posts: n/a
Default Dynamic Year-To-Date Formula

In Excel2000, I would like to create a dynamic year-to-date formula. I
have the following data starting in row 3 and going from column A to
column X:

Jan Actuals Jan Budget Feb Actuals Feb Budget
100 200 300 400

I would like to use cell A1 as an input cell for the month ( ex. Feb =
2). I would like the formula to lookup the month and then tell me how
much Feb YTD Actuals are ( in this example = 400 ). All I want to
change each month is the input cell in A1 and have the formula
automatically give me the results.


Thanks

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way

=SUMPRODUCT(--(MOD(COLUMN(OFFSET($A$2,,,,CHOOSE($A$10,1,3,5,7,9, 11,13,15,17,19,21,23))),2)=1),OFFSET($A$2,,,,CHOOS E($A$10,1,3,5,7,9,11,13,15,17,19,21,23)))

where A2 holds Jan actuals

Of course if you will only need to sum up to the last entered actual and
there is no more actuals entered you can use

=SUMPRODUCT(--(MOD(COLUMN(A2:X2),2)=1),A2:X2)

In the first formula the cell where you would put the months number is A10,
so replace that cell with the actual cell, you might also want to guard
against if that cell is empty (will return an error)

=IF($A$10="","",SUMPRODUCT(--(MOD(COLUMN(OFFSET($A$2,,,,CHOOSE($A$10,1,3,5,7,9, 11,13,15,17,19,21,23))),2)=1),OFFSET($A$2,,,,CHOOS E($A$10,1,3,5,7,9,11,13,15,17,19,21,23))))


Regards,

Peo Sjoblom



"snax500" wrote:

In Excel2000, I would like to create a dynamic year-to-date formula. I
have the following data starting in row 3 and going from column A to
column X:

Jan Actuals Jan Budget Feb Actuals Feb Budget
100 200 300 400

I would like to use cell A1 as an input cell for the month ( ex. Feb =
2). I would like the formula to lookup the month and then tell me how
much Feb YTD Actuals are ( in this example = 400 ). All I want to
change each month is the input cell in A1 and have the formula
automatically give me the results.


Thanks


  #3   Report Post  
McCarthy_MF
 
Posts: n/a
Default

I've used the HLookup for this.

To do this I'd have =today() in your cell A1 formated to display only the
month. Then I'd custom format the "actual" column headders to display MMM
"Actual" based on the number in that cell (then the number 2 would read Feb
Actual). With the HLookup I'd check cell A1 (the =today() formula) and
bounce it aginst the numbers in the "Actual" column headders and return the
cell below that.

For me this made it dynamic enough to display upon opening the current
actual value w/o input. If you wanted to look at prior months, cell A1 would
need adjust ment, for that I use a secondary input cell so my forumula reads
=today()-Z1. Then I can use Z1 to add or subtract from the date w/o loosing
my reference cell.

Good luck.

"snax500" wrote:

In Excel2000, I would like to create a dynamic year-to-date formula. I
have the following data starting in row 3 and going from column A to
column X:

Jan Actuals Jan Budget Feb Actuals Feb Budget
100 200 300 400

I would like to use cell A1 as an input cell for the month ( ex. Feb =
2). I would like the formula to lookup the month and then tell me how
much Feb YTD Actuals are ( in this example = 400 ). All I want to
change each month is the input cell in A1 and have the formula
automatically give me the results.


Thanks


  #4   Report Post  
snax500
 
Posts: n/a
Default

Thanks,

It works perfectly. Can you please tell me how this formula works. I am
not that familiar with these functions.

Thanks again.

=SUMPRODUCT(--(MOD(COLUMN(OFFSET($A$2,,,,CHOOSE($A$10,1,3,5,7,9, 11,13,15,17,19,21,23))),2)=1),OFFSET($A$2,,,,CHOOS E($A$10,1,3,5,7,9,11,13,15,17,19,21,23)))

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
Date Formula Robyn Bellanger Excel Discussion (Misc queries) 2 December 17th 04 07:25 PM
Date formula Robyn Bellanger Excel Discussion (Misc queries) 2 December 16th 04 12:41 AM
How do I add a date formula to a cell but hide the contents with . Emzy Wemzy Excel Discussion (Misc queries) 2 December 12th 04 01:48 PM
Excel2K: Is it possible to use dynamic named ranges in custom data validation formula? Arvi Laanemets Excel Discussion (Misc queries) 0 December 2nd 04 11:29 AM
Formula for date function Markitos Excel Worksheet Functions 15 November 10th 04 02:05 AM


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