PC Review


Reply
Thread Tools Rate Thread

How Do I DO IF with DATE

 
 
Dig
Guest
Posts: n/a
 
      3rd Jul 2008
I have a workbook with 2 sheets. The first sheet has a report for individuals
sales. Each row has a date then cust name then amount from left to right.

The other sheet has a table setup to do monthly totals to figure
commissions. First is the rep name then total sales for a given month then
commission percent then commission amount from Left to Right.

What I want to do is have the TOTAL SALES in SHEET 2 look in SHEET 1 and
TOTAL all sales for say any date that has a 7 as the first number (this would
be for JULY). Obviously I have other cells that will need to look and see if
there is an 8 (AUGUST) as the first date number and so on but once I figure
the first on out it is a simple matter of repeating the process.

Can I use an IF statement or is there a better way to do this.

You help is appreciated greatly
Thanks
 
Reply With Quote
 
 
 
 
Gary Brown
Guest
Posts: n/a
 
      3rd Jul 2008
I think you may need a cheater column with the formula '=Month(date)' and the
SumProduct function.
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Dig" wrote:

> I have a workbook with 2 sheets. The first sheet has a report for individuals
> sales. Each row has a date then cust name then amount from left to right.
>
> The other sheet has a table setup to do monthly totals to figure
> commissions. First is the rep name then total sales for a given month then
> commission percent then commission amount from Left to Right.
>
> What I want to do is have the TOTAL SALES in SHEET 2 look in SHEET 1 and
> TOTAL all sales for say any date that has a 7 as the first number (this would
> be for JULY). Obviously I have other cells that will need to look and see if
> there is an 8 (AUGUST) as the first date number and so on but once I figure
> the first on out it is a simple matter of repeating the process.
>
> Can I use an IF statement or is there a better way to do this.
>
> You help is appreciated greatly
> Thanks

 
Reply With Quote
 
Sandy Mann
Guest
Posts: n/a
 
      3rd Jul 2008
You don't mention the Rep's name in Sheet 1 so assuming that in Sheet 1:

Column A: Rep's name
Column B: Date
Column C: Customer Name
Column D: Amount

In Sheet 2:

Column A: Rep's name
Column B:
=SUMPRODUCT((Sheet1!A2:A200=A2)*(MONTH(Sheet1!B2:B200)=7)*Sheet1!C2:C200)

(ie A2 in Sheet2 is the Rep's name). Adjust the ranges to your requirements.


--
HTH

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

(E-Mail Removed)
Replace @mailinator.com with @tiscali.co.uk


"Dig" <(E-Mail Removed)> wrote in message
news:E0DA8E80-7991-4C5C-A0E9-(E-Mail Removed)...
>I have a workbook with 2 sheets. The first sheet has a report for
>individuals
> sales. Each row has a date then cust name then amount from left to right.
>
> The other sheet has a table setup to do monthly totals to figure
> commissions. First is the rep name then total sales for a given month then
> commission percent then commission amount from Left to Right.
>
> What I want to do is have the TOTAL SALES in SHEET 2 look in SHEET 1 and
> TOTAL all sales for say any date that has a 7 as the first number (this
> would
> be for JULY). Obviously I have other cells that will need to look and see
> if
> there is an 8 (AUGUST) as the first date number and so on but once I
> figure
> the first on out it is a simple matter of repeating the process.
>
> Can I use an IF statement or is there a better way to do this.
>
> You help is appreciated greatly
> Thanks
>



 
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
what method to use to add 1 day to a date (hotel reservation for one night by clicking on calender) and get it displayed in date formate in a textbox for departure date? Amanda Microsoft VB .NET 2 10th Oct 2006 06:52 AM
Link date to a table with Date Range (Eff Date and term date) =?Utf-8?B?S2V2aW4gUmVlZA==?= Microsoft Access 1 31st Aug 2006 04:23 PM
i have two date fileds Opend date Due date, can i set default on due date so, its always = to open date on my data entry form1 Urgent Mike Saifie Microsoft Access Form Coding 1 9th Mar 2006 01:08 AM
Run Query from date to date, Print the from date to date in the header of the report? Dustin Swartz Microsoft Access Queries 1 25th Jan 2005 07:06 PM
Date fields automatically changing when today date matches date field entry.Help! Brian Cassin Microsoft Access Forms 1 15th Nov 2003 01:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:43 PM.