PC Review


Reply
Thread Tools Rate Thread

Calculate according to Drop Down control list value

 
 
K
Guest
Posts: n/a
 
      5th Nov 2008
Hi all, In Range("B7:M7") I have months headings like "APR 08 , MAY
08 …. till MAR 09" and two rows below from these headings in
Range("B10:M22") I have amounts. I also have two drop down controls
on top of the Sheet. Each of those also got months in drop down list
like "APR 08 ..... MAR 09". One cell to right of those drop down
controls i gave heading like to first one i put "FROM" and to second
one i put "TO". "FROM" drop down control result cell is Range("B3")
and "TO" drop down control result cell is Range("D5"). I want macro
on a button that when i select any month in drop down list of those
controls like if i select "APR08" in "FROM" drop down control list and
"AUG 08" in "TO" drop down control list then macro should check those
months and the months between them in Range("B7:M7") headings and SUM
the amounts coming in those months columns in Range("B10:M22") and put
result in Range("O10:O22"). I have uploded my excel file in here
(http://www.savefile.com/files/1872510).
Please see my file for more clear understanding. I'll really
appricate any help from any friend.
 
Reply With Quote
 
 
 
 
Nigel
Guest
Posts: n/a
 
      5th Nov 2008
In each column total (Column O) put the following formula into row 10 and
copy down to row 22.

=SUMPRODUCT((B$7:M$7>=$C$1)*(B$7:M$7<=$E$1)*(B10:M10))

This will test if the dates in Row 7 are between the date in the cells with
the 'from' and 'to' dates, these are those populated as you change the drop
down list. Since you do not specify which cells; in the formula I used C1
for 'from' and E1 as 'to'. Change these to the specific cells you have used.

NOTE: This is an array formula so when you have typed it in, hold down the
Ctrl-Shift key then press Enter.

--

Regards,
Nigel
(E-Mail Removed)



"K" <(E-Mail Removed)> wrote in message
news:395747f5-dcab-4bac-bf40-(E-Mail Removed)...
Hi all, In Range("B7:M7") I have months headings like "APR 08 , MAY
08 …. till MAR 09" and two rows below from these headings in
Range("B10:M22") I have amounts. I also have two drop down controls
on top of the Sheet. Each of those also got months in drop down list
like "APR 08 ..... MAR 09". One cell to right of those drop down
controls i gave heading like to first one i put "FROM" and to second
one i put "TO". "FROM" drop down control result cell is Range("B3")
and "TO" drop down control result cell is Range("D5"). I want macro
on a button that when i select any month in drop down list of those
controls like if i select "APR08" in "FROM" drop down control list and
"AUG 08" in "TO" drop down control list then macro should check those
months and the months between them in Range("B7:M7") headings and SUM
the amounts coming in those months columns in Range("B10:M22") and put
result in Range("O10:O22"). I have uploded my excel file in here
(http://www.savefile.com/files/1872510).
Please see my file for more clear understanding. I'll really
appricate any help from any friend.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to control drop down list width DocBrown Microsoft Excel Worksheet Functions 4 17th Mar 2009 06:03 PM
how to calculate depend on drop-down list value? tracy Microsoft Excel Misc 1 3rd Dec 2007 01:15 AM
Drop Down List User Control jacbyrd@gmail.com Microsoft ASP .NET 1 19th Jun 2007 07:16 PM
Problems with Drop Down List Control Derty Microsoft ASP .NET 0 20th Nov 2006 08:14 AM
Base drop down list on another control value KLR Microsoft Access Forms 3 3rd Aug 2006 09:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:06 PM.