Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Determine qty charged per month

Lets say I have a table like

User StartDate EndDate Qty
John 5/1/07 5/10/07 10
Amy 5/14/07 5/20/07 5
Bob 5/25/07 6/10/07 17
Henry 6/1/07 6/5/07 4

I am trying to figure each user got per month, so I originally thought
it would be easy and I could use a pivot tablet to group the start
dates by month and then sum the qty. The problem is with people like
Bob is that the time frame spans two months, so I would want 7 counted
for May and 10 counted for June. I was trying to come up with a
formula to do this but I don't think that would work after trying a
few things since there isn't a way you could put the 7 in one cell for
may and the 10 in another cell for june. Any ideas on how to do this
with formulas, pivot table, or VBA?

Thanks,
Andrew V. Romero

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Determine qty charged per month

In F2: =ROUND(D2*DAY(C2)/(C2-B+1),2)
E2: D2-E2

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message
ups.com...
Lets say I have a table like

User StartDate EndDate Qty
John 5/1/07 5/10/07 10
Amy 5/14/07 5/20/07 5
Bob 5/25/07 6/10/07 17
Henry 6/1/07 6/5/07 4

I am trying to figure each user got per month, so I originally thought
it would be easy and I could use a pivot tablet to group the start
dates by month and then sum the qty. The problem is with people like
Bob is that the time frame spans two months, so I would want 7 counted
for May and 10 counted for June. I was trying to come up with a
formula to do this but I don't think that would work after trying a
few things since there isn't a way you could put the 7 in one cell for
may and the 10 in another cell for june. Any ideas on how to do this
with formulas, pivot table, or VBA?

Thanks,
Andrew V. Romero



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
Determine if a month falls between two dates. Robert R Excel Worksheet Functions 6 April 24th 23 09:00 PM
Need a way to determine the # of Saturdays in a month Chuck M Excel Worksheet Functions 4 July 5th 07 09:34 PM
How to determine the number of month between 2 periods? Eric Excel Discussion (Misc queries) 5 March 8th 07 12:04 AM
How to determine the number of month between 2 periods? Eric Excel Worksheet Functions 1 March 7th 07 04:00 PM
Determine Last working day of Month Nigel Excel Programming 5 July 25th 06 07:50 PM


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