ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I use the IF function with info that contains a date? (https://www.excelbanter.com/excel-worksheet-functions/222788-how-do-i-use-if-function-info-contains-date.html)

Red River Transport

How do I use the IF function with info that contains a date?
 
I have a spreadsheet and would like to pull information from certain dates.
For example, our pay periods run from the first of the month through the
15th, and then again from the 16th through the end of the month. I'd like to
create an IF function that sums driver pay from the 1st through the 15th and
then from the 16th to the end of the month. Any ideas?

Shane Devenshire

How do I use the IF function with info that contains a date?
 
Hi,

If your data is by month then:

=SUMPRODUCT(--(DAY(A1:A31)<=15),B1:B31)

=SUMPRODUCT(--(DAY(A1:A31)15),B1:B31)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Red River Transport" wrote:

I have a spreadsheet and would like to pull information from certain dates.
For example, our pay periods run from the first of the month through the
15th, and then again from the 16th through the end of the month. I'd like to
create an IF function that sums driver pay from the 1st through the 15th and
then from the 16th to the end of the month. Any ideas?



All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com