• Status: Solved
• Priority: Medium
• Security: Public
• Views: 286

# Left formula with IF

Hi,

I have some left formula with an IF thats not quite working.

The cell highlighted red needs to be the date from cell C4.

Can someone have a look and see where the error is?

Thanks
Seamus
test1.xls
0
Seamus2626
2 Solutions

Commented:
You don't need to use an if formula for that :)

Put this formula there =C4 and then format the cell as mm/dd/yyyy

Sid
0

Commented:
Sample attached.

Sid
Test.xls
0

Microsoft MVP ExcelCommented:
Hello Seamus,

since you want the date only when column E is "no", you can use

=IF(E4="No",Int(C4),"")

then format the result cell as date. The INT() will cut off the time portion. Or just use

=IF(E4="No",C4,"")

and format as date without time.

cheers, teylyn
0

Commented:
or

=IF(E4="No",TEXT(C4,"mm/dd/yyyy"))
0

But for example a formula for that would be:

=IF(E4="No",TEXT(C4,"mm dd yyyy"),"")

Chris
0

Commented:
Sid means to say no need for LEFT:
=IF(E4="No",LEFT(C4,10),"")
So it becomes:
=IF(E4="No",C4,"")
0

Commented:
Thanks jimy :)

Yes you are right.

Sid
0

Commented:
Seamus: I re looked at the posts. Though I pointed you in the right direction, I believe Teylyn gave you the exact answer and hence the points should have been split between me and her ;)

Sid
0

Author Commented:
Thanks Sid, have requested attention and will reallocate.

Thank you
Seamus
0

Commented:
Much appreciated :)

Sid
0

Author Commented:
Nope, thank you!

Seamus
0

Author Commented:
Thanks all

Seamus
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.