ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional End Date in Data Validation Settings (https://www.excelbanter.com/excel-worksheet-functions/85769-conditional-end-date-data-validation-settings.html)

Gos-C

Conditional End Date in Data Validation Settings
 

Hi,

I am trying to enter a formula in the Data Validation settings so that
only days *between* Start Date DAY(A1) and *End Date DAY(A2)* if A2 is
not blank or *End Date DAY(A1)* if A2 is blank are valid.

I can enter the following formula for the End Date in the spreadsheet
cells, but not in the Data Validation settings:

=IF(ISBLANK(A2),DAY(A1),DAY(A2))

Any help, please?

Thank you,
Gos-C


--
Gos-C


------------------------------------------------------------------------
Gos-C's Profile: http://www.excelforum.com/member.php...o&userid=14518
View this thread: http://www.excelforum.com/showthread...hreadid=537032


Peo Sjoblom

Conditional End Date in Data Validation Settings
 
Why not using the built in date validation, allowdate, between start date
=A1 and end date =A2
or do you want something else?

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"Gos-C" wrote in
message ...

Hi,

I am trying to enter a formula in the Data Validation settings so that
only days *between* Start Date DAY(A1) and *End Date DAY(A2)* if A2 is
not blank or *End Date DAY(A1)* if A2 is blank are valid.

I can enter the following formula for the End Date in the spreadsheet
cells, but not in the Data Validation settings:

=IF(ISBLANK(A2),DAY(A1),DAY(A2))

Any help, please?

Thank you,
Gos-C


--
Gos-C


------------------------------------------------------------------------
Gos-C's Profile:
http://www.excelforum.com/member.php...o&userid=14518
View this thread: http://www.excelforum.com/showthread...hreadid=537032




Gos-C

Conditional End Date in Data Validation Settings
 

That's not valid when A2 is blank.

Gos-C


--
Gos-C


------------------------------------------------------------------------
Gos-C's Profile: http://www.excelforum.com/member.php...o&userid=14518
View this thread: http://www.excelforum.com/showthread...hreadid=537032


Peo Sjoblom

Conditional End Date in Data Validation Settings
 
If you deselect "ignore blank" then you can't enter anything

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Gos-C" wrote in
message ...

That's not valid when A2 is blank.

Gos-C


--
Gos-C


------------------------------------------------------------------------
Gos-C's Profile:
http://www.excelforum.com/member.php...o&userid=14518
View this thread: http://www.excelforum.com/showthread...hreadid=537032




Gos-C

Conditional End Date in Data Validation Settings
 

If the day in A1 is 24 and the day in A2 in 28, the keyer is allowed to
enter 24, 25, 26, 27 or 28 in cell B5, for example. If the day in A1
is 31 and A2 is blank, then the keyer is allowed to enter 31 and
nothing else.


--
Gos-C


------------------------------------------------------------------------
Gos-C's Profile: http://www.excelforum.com/member.php...o&userid=14518
View this thread: http://www.excelforum.com/showthread...hreadid=537032


Peo Sjoblom

Conditional End Date in Data Validation Settings
 
Maybe

=OR(AND(B5=DAY(A1),B5<=DAY(A2)),AND(B5=DAY(A1),A2 =""))

you need to deselect ignore blank

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"Gos-C" wrote in
message ...

If the day in A1 is 24 and the day in A2 in 28, the keyer is allowed to
enter 24, 25, 26, 27 or 28 in cell B5, for example. If the day in A1
is 31 and A2 is blank, then the keyer is allowed to enter 31 and
nothing else.


--
Gos-C


------------------------------------------------------------------------
Gos-C's Profile:
http://www.excelforum.com/member.php...o&userid=14518
View this thread: http://www.excelforum.com/showthread...hreadid=537032




Gos-C

Conditional End Date in Data Validation Settings
 

Thanks, Peo. That worked!

Gos-C


--
Gos-C


------------------------------------------------------------------------
Gos-C's Profile: http://www.excelforum.com/member.php...o&userid=14518
View this thread: http://www.excelforum.com/showthread...hreadid=537032



All times are GMT +1. The time now is 07:44 PM.

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