ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Simple IF function query (hopefully) (https://www.excelbanter.com/excel-discussion-misc-queries/82417-simple-if-function-query-hopefully.html)

ahaigh

Simple IF function query (hopefully)
 

Hi,

I have two columns (J & U) that contains date values (dd/mm/yyyy if
it's important.)

I know how to calculate the number of days between the two which I've
done in column V, however in some cases one or both of columns J & U
are blank. In these cases I'd like my results column to just return
blank also.

Can I make this happen using an IF function? I'd use conditional
formatting, but really just need the cell to contain no value at all
rather than one I can't see.

Thanks in advance,


--
ahaigh
------------------------------------------------------------------------
ahaigh's Profile: http://www.excelforum.com/member.php...o&userid=32414
View this thread: http://www.excelforum.com/showthread...hreadid=531477


Dav

Simple IF function query (hopefully)
 

If J contains the start date and U contains the end date

Try =IF(AND(J10,U10),U1-J1,"") as you calculation

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=531477


paul

Simple IF function query (hopefully)
 
=IF(OR(ISBLANK(J1),ISBLANK(U1)),"",J1-U1)

paul

remove nospam for email addy!



"ahaigh" wrote:


Hi,

I have two columns (J & U) that contains date values (dd/mm/yyyy if
it's important.)

I know how to calculate the number of days between the two which I've
done in column V, however in some cases one or both of columns J & U
are blank. In these cases I'd like my results column to just return
blank also.

Can I make this happen using an IF function? I'd use conditional
formatting, but really just need the cell to contain no value at all
rather than one I can't see.

Thanks in advance,


--
ahaigh
------------------------------------------------------------------------
ahaigh's Profile:
http://www.excelforum.com/member.php...o&userid=32414
View this thread: http://www.excelforum.com/showthread...hreadid=531477



ahaigh

Simple IF function query (hopefully)
 

That's great,

Cheers


--
ahaigh
------------------------------------------------------------------------
ahaigh's Profile: http://www.excelforum.com/member.php...o&userid=32414
View this thread: http://www.excelforum.com/showthread...hreadid=531477



All times are GMT +1. The time now is 11:48 AM.

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