Thread: HELP!!!!
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default HELP!!!!

If your dates are real XL dates then in Sheet2 Cell C3 enter the formula:

=SUMPRODUCT((MONTH(Sheet1!L2:L200)=6)*(Sheet1!I2:I 200))

For July in C4 change the (MONTH(Sheet1!L2:L200)=6) to
(MONTH(Sheet1!L2:L200)=7)

If the data extends over more than one year then use:

=SUMPRODUCT((MONTH(Sheet1!L2:L200)=6)*(YEAR(Sheet1 !L2:L200)=2008)*(Sheet1!I2:I200))

for January, where the formula would take an empty cell as being a January
date use:

=SUMPRODUCT((Sheet1!L2:L200<"")*(MONTH(Sheet1!L2: L200)=6)*(YEAR(Sheet1!L2:L200)=2008)*(Sheet1!I2:I2 00))

or

=SUMPRODUCT((Sheet1!L2:L200<"")*(MONTH(Sheet1!L2: L200)=6)*(Sheet1!I2:I200))

without checking the year.


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Wiggy" wrote in message
...
I know that this is probably a simple fomula to write, but I'm having no
luck
at all in getting it to do what i want.
Sheet1, col i is a sales figure
Sheet1, col L is a sales date
Sheet2, col C is the monthly sales figure


I want to automatically add the sales into the right monthly figures
without having to do it manually, bareing in mind that sheet 1 may not be
entered in a chronological order.
Basically, if L6=(a date in june) add i6 to Sheet2 c3
if L12=( date in june) add i12 to sheet2 c3
if L9=(a date in july) add i9 to heet to c4
Anyone any ideas?? I've started to pull my hair out!!