Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Calculate according to Drop Down control list value

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Calculate according to Drop Down control list value

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:M 10))

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




"K" wrote in message
...
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
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
How to control drop down list width DocBrown Excel Worksheet Functions 4 March 17th 09 06:03 PM
how to calculate depend on drop-down list value? tracy Excel Discussion (Misc queries) 1 December 3rd 07 01:15 AM
Limit data entered to list (drop-down control) Ronnie Excel Programming 3 May 12th 06 12:06 PM
Control Display of Drop Down List in Validation dschlamp17 Excel Worksheet Functions 1 March 28th 06 11:25 PM
Combo box control Drop down list moving Eric_B Excel Programming 1 June 21st 05 02:28 PM


All times are GMT +1. The time now is 12:51 AM.

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"