ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Statement (https://www.excelbanter.com/excel-worksheet-functions/216037-if-statement.html)

Liz C

IF Statement
 
I have week beginning dates in row 1 starting on F, Work Start dates in
column D, and Work End dates in column E.

How can I get it in cell F2 to put a "1" if the work start and end dates
fall within the week in F?

Thanks again for your help!

Liz

xlmate

IF Statement
 
Hi Liz,

Assuming that your week refers to 7 days, change 7 to 5
if yours is a 5-day week
try this formula in F2 and copy down as far as your data is.
This will put a 1 into F2 if the start and end dates
fall within the week and a blank if otherwise.

=IF(E2-D2<=7,1,"")

Does this do what you want?
Pls post back if not

HTH
--
If this posting is helpful, appreciate that you click on the Yes button below

Thank You

cheers, francis



"Liz C" wrote:

I have week beginning dates in row 1 starting on F, Work Start dates in
column D, and Work End dates in column E.

How can I get it in cell F2 to put a "1" if the work start and end dates
fall within the week in F?

Thanks again for your help!

Liz


Liz C

IF Statement
 
I don't see in your formula how it takes the date in F1 into account.

I have week starting dates across the top and employees with scheduled work
start and end dates down the side. I want to put a "1" in the cells for the
weeks they work. Like below:
start end 1/5/09 1/12/09
1/19/09
fred smith 12/18/08 2/13/09 1 1 1

I really appreciate your help.

Liz

"Liz C" wrote:

I have week beginning dates in row 1 starting on F, Work Start dates in
column D, and Work End dates in column E.

How can I get it in cell F2 to put a "1" if the work start and end dates
fall within the week in F?

Thanks again for your help!

Liz


xlmate

IF Statement
 
Assuming that you want to place a 1 in F2 and across for dates that fall
within the Start and End dates, otherwise it return a blank

try this formula and copy across

=IF(AND(F$1$D2,F$1<$E2),1,"")


Does this do what you want?

HTH

--
If this posting is helpful, appreciate that you click on the Yes button below

Thank You

cheers, francis


"Liz C" wrote:

I don't see in your formula how it takes the date in F1 into account.

I have week starting dates across the top and employees with scheduled work
start and end dates down the side. I want to put a "1" in the cells for the
weeks they work. Like below:
start end 1/5/09 1/12/09 1/19/09
fred smith 12/18/08 2/13/09 1 1 1

I really appreciate your help.

Liz

"Liz C" wrote:

I have week beginning dates in row 1 starting on F, Work Start dates in
column D, and Work End dates in column E.

How can I get it in cell F2 to put a "1" if the work start and end dates
fall within the week in F?

Thanks again for your help!

Liz


Shane Devenshire[_2_]

IF Statement
 
Hi,

I'm not clear on what 12/18/08 and 2/13/09 have to do with your arrangement.
I though you were trying to find out if 1/19/2009 was between 1/5/09 and
1/12/09?

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Liz C" wrote:

I don't see in your formula how it takes the date in F1 into account.

I have week starting dates across the top and employees with scheduled work
start and end dates down the side. I want to put a "1" in the cells for the
weeks they work. Like below:
start end 1/5/09 1/12/09
1/19/09
fred smith 12/18/08 2/13/09 1 1 1

I really appreciate your help.

Liz

"Liz C" wrote:

I have week beginning dates in row 1 starting on F, Work Start dates in
column D, and Work End dates in column E.

How can I get it in cell F2 to put a "1" if the work start and end dates
fall within the week in F?

Thanks again for your help!

Liz


David Biddulph[_2_]

IF Statement
 
=IF(AND($D2<=F$1+6,$E2=F$1),1,"")
--
David Biddulph

Liz C wrote:
I don't see in your formula how it takes the date in F1 into account.

I have week starting dates across the top and employees with
scheduled work start and end dates down the side. I want to put a "1"
in the cells for the weeks they work. Like below:
start end 1/5/09 1/12/09
1/19/09
fred smith 12/18/08 2/13/09 1 1
1

I really appreciate your help.

Liz

"Liz C" wrote:

I have week beginning dates in row 1 starting on F, Work Start dates
in column D, and Work End dates in column E.

How can I get it in cell F2 to put a "1" if the work start and end
dates fall within the week in F?

Thanks again for your help!

Liz




Liz C

IF Statement
 
Thank you David! That worked!

Liz

"David Biddulph" wrote:

=IF(AND($D2<=F$1+6,$E2=F$1),1,"")
--
David Biddulph

Liz C wrote:
I don't see in your formula how it takes the date in F1 into account.

I have week starting dates across the top and employees with
scheduled work start and end dates down the side. I want to put a "1"
in the cells for the weeks they work. Like below:
start end 1/5/09 1/12/09
1/19/09
fred smith 12/18/08 2/13/09 1 1
1

I really appreciate your help.

Liz

"Liz C" wrote:

I have week beginning dates in row 1 starting on F, Work Start dates
in column D, and Work End dates in column E.

How can I get it in cell F2 to put a "1" if the work start and end
dates fall within the week in F?

Thanks again for your help!

Liz






All times are GMT +1. The time now is 07:30 AM.

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