Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Sprint54
 
Posts: n/a
Default There's Got to be an Easier Way

How could this formula be simplified?
=IF($D$2=1,K13,IF($D$2=2,SUM(K13:L13),IF($D$2=3, SUM(K13:M13),IF($D$2=4,SUM(K13:N13),IF($D$2=5,SU M(K13:O13),IF($D$2=6,SUM(K13:P13),0))))))

It's purpose is to total monthly numbers for a YTD total based on the
current month. In cell D2 is the current month number (1 for Jan, 2 for Feb,
etc..) The monthly actuals are located in cells K13 through V13. The
formula is entered in cell I13. The idea is that each new month the monthly
indicator in cell D2 is updated to reflect the current month. I then want
the new YTD number to be summed in cell I13. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default There's Got to be an Easier Way

=SUM(OFFSET(K13,,,1,D2))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Sprint54" wrote in message
...
How could this formula be simplified?

=IF($D$2=1,K13,IF($D$2=2,SUM(K13:L13),IF($D$2=3, SUM(K13:M13),IF($D$2=4,SU
M(K13:N13),IF($D$2=5,SUM(K13:O13),IF($D$2=6,SUM( K13:P13),0))))))

It's purpose is to total monthly numbers for a YTD total based on the
current month. In cell D2 is the current month number (1 for Jan, 2 for

Feb,
etc..) The monthly actuals are located in cells K13 through V13. The
formula is entered in cell I13. The idea is that each new month the

monthly
indicator in cell D2 is updated to reflect the current month. I then want
the new YTD number to be summed in cell I13. Thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default There's Got to be an Easier Way

As it stands, this won't work after February, since the =2 condition would
be satisfied. And you'll soon hit Excel's limit of seven levels of nested
functions.
I think you can replace it with =sum(offset($k$13,0,0,1,$d$2))
--Bruce

"Sprint54" wrote:

How could this formula be simplified?
=IF($D$2=1,K13,IF($D$2=2,SUM(K13:L13),IF($D$2=3, SUM(K13:M13),IF($D$2=4,SUM(K13:N13),IF($D$2=5,SU M(K13:O13),IF($D$2=6,SUM(K13:P13),0))))))

It's purpose is to total monthly numbers for a YTD total based on the
current month. In cell D2 is the current month number (1 for Jan, 2 for Feb,
etc..) The monthly actuals are located in cells K13 through V13. The
formula is entered in cell I13. The idea is that each new month the monthly
indicator in cell D2 is updated to reflect the current month. I then want
the new YTD number to be summed in cell I13. Thanks

  #6   Report Post  
Posted to microsoft.public.excel.misc
Sprint54
 
Posts: n/a
Default There's Got to be an Easier Way

Thank you.. I used the offset formula.

"Sprint54" wrote:

How could this formula be simplified?
=IF($D$2=1,K13,IF($D$2=2,SUM(K13:L13),IF($D$2=3, SUM(K13:M13),IF($D$2=4,SUM(K13:N13),IF($D$2=5,SU M(K13:O13),IF($D$2=6,SUM(K13:P13),0))))))

It's purpose is to total monthly numbers for a YTD total based on the
current month. In cell D2 is the current month number (1 for Jan, 2 for Feb,
etc..) The monthly actuals are located in cells K13 through V13. The
formula is entered in cell I13. The idea is that each new month the monthly
indicator in cell D2 is updated to reflect the current month. I then want
the new YTD number to be summed in cell I13. Thanks

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
Is there an easier way? wmaughan Excel Discussion (Misc queries) 5 December 27th 05 10:56 PM
Procedure to make a dropdown list larger so it's easier to read Jack Oziel Excel Discussion (Misc queries) 4 December 26th 05 05:49 PM
Please make it easier to access the IS functions (e.g., isblank) . melyndac2005 Excel Worksheet Functions 9 August 28th 05 05:06 AM
Trying to enlarge tab size on worksheet for easier reading ricknstl Excel Discussion (Misc queries) 4 May 8th 05 03:41 PM
Excel Hyperlink: Is there an easier way to follow then double-cli. Bob Small Excel Discussion (Misc queries) 1 December 9th 04 11:24 PM


All times are GMT +1. The time now is 11:50 PM.

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

About Us

"It's about Microsoft Excel"