#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 'If' formula

It must be early monday morning because I can not wrap my head around this.

I have a spreadsheet that has due dates and pay dates that are different
depending on sales rep. This is an example:

A B C D E
1 customer sales rep inv date due date pay date
2 misc 1 SLS 11/30/2009
3 misc 2 HOU 11/30/2009
4 misc 3 NAG 11/30/2009
5 misc 4 KAS 11/30/2009



Sales Rep SLS always gets paid on the first of the month following the
invoice date.
Sales Rep NAG always gets paid on the 15th if in by the 30th and paid by the
30th if in by the 15th.
Sales Rep KAS and HOU is net due 30 days.

Can anyone help?



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 269
Default 'If' formula

I would assume that your data contains many different reps with terms.

I would probably start with use the choose funtion.

CHOOSE(index_num,value1,value2,...)

Make a table that equates each rep with with set of terms (make these a
number so they can go dieectly into the Choose funtion).

You can than do something like Choose(Vlookup(Rep,TermsTable,2,false) to get
a number 1-whatever representing each set of terms,

You can then put formulas to get you date for each type.

If this helps, please remember to click yes.


"Hendee70" wrote:

It must be early monday morning because I can not wrap my head around this.

I have a spreadsheet that has due dates and pay dates that are different
depending on sales rep. This is an example:

A B C D E
1 customer sales rep inv date due date pay date
2 misc 1 SLS 11/30/2009
3 misc 2 HOU 11/30/2009
4 misc 3 NAG 11/30/2009
5 misc 4 KAS 11/30/2009



Sales Rep SLS always gets paid on the first of the month following the
invoice date.
Sales Rep NAG always gets paid on the 15th if in by the 30th and paid by the
30th if in by the 15th.
Sales Rep KAS and HOU is net due 30 days.

Can anyone help?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 'If' formula

There are only the four reps. Wouldn't it be easier to use the if function? I
am pretty well versed in Excel, with exception to these formulas. I can use
the if but I am not sure how to do it with more than on set.

"Paul C" wrote:

I would assume that your data contains many different reps with terms.

I would probably start with use the choose funtion.

CHOOSE(index_num,value1,value2,...)

Make a table that equates each rep with with set of terms (make these a
number so they can go dieectly into the Choose funtion).

You can than do something like Choose(Vlookup(Rep,TermsTable,2,false) to get
a number 1-whatever representing each set of terms,

You can then put formulas to get you date for each type.

If this helps, please remember to click yes.


"Hendee70" wrote:

It must be early monday morning because I can not wrap my head around this.

I have a spreadsheet that has due dates and pay dates that are different
depending on sales rep. This is an example:

A B C D E
1 customer sales rep inv date due date pay date
2 misc 1 SLS 11/30/2009
3 misc 2 HOU 11/30/2009
4 misc 3 NAG 11/30/2009
5 misc 4 KAS 11/30/2009



Sales Rep SLS always gets paid on the first of the month following the
invoice date.
Sales Rep NAG always gets paid on the 15th if in by the 30th and paid by the
30th if in by the 15th.
Sales Rep KAS and HOU is net due 30 days.

Can anyone help?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default 'If' formula

You could approach it like this in D2:

=IF(B2="SLS",DATE(YEAR(C2),MONTH(C2)+1,1),0) + IF(B2="NAG",IF(DAY(C2)
<=15,DATE(YEAR(C2),MONTH(C2),30),DATE(YEAR(C2),MON TH(C2)+1,15)),0) + IF
(OR(B2="KAS",B2="HOU"),C2+30,0)

Note that 30th February does not exist, so NAG might have a due date
of 1st (if leap year) or 2nd March.

Then copy down as required.

Hope this helps.

Pete

On Dec 7, 3:58*pm, Hendee70
wrote:
There are only the four reps. Wouldn't it be easier to use the if function? I
am pretty well versed in Excel, with exception to these formulas. I can use
the if but I am not sure how to do it with more than on set.



"Paul C" wrote:
I would assume that your data contains many different reps with terms.


I would probably start with use the choose funtion. *


CHOOSE(index_num,value1,value2,...)


Make a table that equates each rep with with set of terms (make these a
number so they can go dieectly into the Choose funtion).


You can than do something like Choose(Vlookup(Rep,TermsTable,2,false) to get
a number 1-whatever representing each set of terms,


You can then put formulas to get you date for each type.


If this helps, please remember to click yes.


"Hendee70" wrote:


It must be early monday morning because I can not wrap my head around this.


I have a spreadsheet that has due dates and pay dates that are different
depending on sales rep. This is an example:


* * * A * * * B * * * C * * * D * * * E
1 * * customer * * * *sales rep * * * inv date * * * *due date * * * *pay date
2 * * misc 1 *SLS * * 11/30/2009 * * * * * * *
3 * * misc 2 *HOU * * 11/30/2009 * * * * * * *
4 * * misc 3 *NAG * * 11/30/2009 * * * * * * *
5 * * misc 4 *KAS * * 11/30/2009 * * * * * * *


Sales Rep SLS always gets paid on the first of the month following the
invoice date.
Sales Rep NAG always gets paid on the 15th if in by the 30th and paid by the
30th if in by the 15th.
Sales Rep KAS and HOU is net due 30 days.


Can anyone help?- Hide quoted text -


- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 'If' formula

There is something wrong with the formula. When I use it I get an error
message about too many arguements. I do not have my glasses with me today,
and I am having a problem trying to find the error.

"Pete_UK" wrote:

You could approach it like this in D2:

=IF(B2="SLS",DATE(YEAR(C2),MONTH(C2)+1,1),0) + IF(B2="NAG",IF(DAY(C2)
<=15,DATE(YEAR(C2),MONTH(C2),30),DATE(YEAR(C2),MON TH(C2)+1,15)),0) + IF
(OR(B2="KAS",B2="HOU"),C2+30,0)

Note that 30th February does not exist, so NAG might have a due date
of 1st (if leap year) or 2nd March.

Then copy down as required.

Hope this helps.

Pete

On Dec 7, 3:58 pm, Hendee70
wrote:
There are only the four reps. Wouldn't it be easier to use the if function? I
am pretty well versed in Excel, with exception to these formulas. I can use
the if but I am not sure how to do it with more than on set.



"Paul C" wrote:
I would assume that your data contains many different reps with terms.


I would probably start with use the choose funtion.


CHOOSE(index_num,value1,value2,...)


Make a table that equates each rep with with set of terms (make these a
number so they can go dieectly into the Choose funtion).


You can than do something like Choose(Vlookup(Rep,TermsTable,2,false) to get
a number 1-whatever representing each set of terms,


You can then put formulas to get you date for each type.


If this helps, please remember to click yes.


"Hendee70" wrote:


It must be early monday morning because I can not wrap my head around this.


I have a spreadsheet that has due dates and pay dates that are different
depending on sales rep. This is an example:


A B C D E
1 customer sales rep inv date due date pay date
2 misc 1 SLS 11/30/2009
3 misc 2 HOU 11/30/2009
4 misc 3 NAG 11/30/2009
5 misc 4 KAS 11/30/2009


Sales Rep SLS always gets paid on the first of the month following the
invoice date.
Sales Rep NAG always gets paid on the 15th if in by the 30th and paid by the
30th if in by the 15th.
Sales Rep KAS and HOU is net due 30 days.


Can anyone help?- Hide quoted text -


- Show quoted text -


.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default 'If' formula

Maybe you have missed a bracket or a comma in typing it into your
sheet. Here is a direct copy from my formula bar with D2 selected:

=IF(B2="SLS",DATE(YEAR(C2),MONTH(C2)+1,1),0) + IF(B2="NAG",IF(DAY(C2)
<=15,DATE(YEAR(C2),MONTH(C2),30),DATE(YEAR(C2),MON TH(C2)+1,15)),0) + IF
(OR(B2="KAS",B2="HOU"),C2+30,0)

Note that it is all one formula. Perhaps you can copy it from here,
click in D2 and paste it directly into your sheet.

Hope this helps.

Pete

On Dec 7, 6:20*pm, Hendee70
wrote:
There is something wrong with the formula. When I use it I get an error
message about too many arguements. I do not have my glasses with me today,
and I am having a problem trying to find the error.



"Pete_UK" wrote:
You could approach it like this in D2:


=IF(B2="SLS",DATE(YEAR(C2),MONTH(C2)+1,1),0) + IF(B2="NAG",IF(DAY(C2)
<=15,DATE(YEAR(C2),MONTH(C2),30),DATE(YEAR(C2),MON TH(C2)+1,15)),0) + IF
(OR(B2="KAS",B2="HOU"),C2+30,0)


Note that 30th February does not exist, so NAG might have a due date
of 1st (if leap year) or 2nd March.


Then copy down as required.


Hope this helps.


Pete


On Dec 7, 3:58 pm, Hendee70
wrote:
There are only the four reps. Wouldn't it be easier to use the if function? I
am pretty well versed in Excel, with exception to these formulas. I can use
the if but I am not sure how to do it with more than on set.


"Paul C" wrote:
I would assume that your data contains many different reps with terms.


I would probably start with use the choose funtion. *


CHOOSE(index_num,value1,value2,...)


Make a table that equates each rep with with set of terms (make these a
number so they can go dieectly into the Choose funtion).


You can than do something like Choose(Vlookup(Rep,TermsTable,2,false) to get
a number 1-whatever representing each set of terms,


You can then put formulas to get you date for each type.


If this helps, please remember to click yes.


"Hendee70" wrote:


It must be early monday morning because I can not wrap my head around this.


I have a spreadsheet that has due dates and pay dates that are different
depending on sales rep. This is an example:


* * * A * * * B * * * C * * * D * * * E
1 * * customer * * * *sales rep * * * inv date * * * *due date * * * *pay date
2 * * misc 1 *SLS * * 11/30/2009 * * * * * * *
3 * * misc 2 *HOU * * 11/30/2009 * * * * * * *
4 * * misc 3 *NAG * * 11/30/2009 * * * * * * *
5 * * misc 4 *KAS * * 11/30/2009 * * * * * * *


Sales Rep SLS always gets paid on the first of the month following the
invoice date.
Sales Rep NAG always gets paid on the 15th if in by the 30th and paid by the
30th if in by the 15th.
Sales Rep KAS and HOU is net due 30 days.


Can anyone help?- Hide quoted text -


- Show quoted text -


.- Hide quoted text -


- Show quoted text -


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



All times are GMT +1. The time now is 05:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"