Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default An either/or function

I want the following to happen:
If O5 is blank, then P5 will be also (this much is done in the formula below)
If O5 has a date, then the below function will be done (also done)
If Q5 gets populated, then the function will stop (also done)
However, I want to now add something that will perform the same
function/situations in P5 if <bR5</b has a date (O5 and R5 will NOT both
have dates in them)

=IF(O5="","",IF(Q5="",DAYS360(O5,TODAY()),DAYS360( O5,Q5)))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default An either/or function

Sounds like you want:

=IF(AND(O5="",R5=""),"",IF(R5="",IF(Q5="",DAYS360( O5,TODAY()),DAYS360(O5,Q5)),IF(Q5="",DAYS360(R5,TO DAY()),DAYS360(R5,Q5)))

This will first verify if both your criteria cells are blank. If so, "",
else..
If R5 is blank (Thus, O5 is not), do the O5 IF. Otherwise, R5 must not be
blank, and per your statement, O5 is. So, do the same calculation, but with
R5 instead of o5.

"HeatherBelle" wrote:

I want the following to happen:
If O5 is blank, then P5 will be also (this much is done in the formula below)
If O5 has a date, then the below function will be done (also done)
If Q5 gets populated, then the function will stop (also done)
However, I want to now add something that will perform the same
function/situations in P5 if <bR5</b has a date (O5 and R5 will NOT both
have dates in them)

=IF(O5="","",IF(Q5="",DAYS360(O5,TODAY()),DAYS360( O5,Q5)))

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default An either/or function

If I understand you correctly, you want your new formula to do the same thing
for the other 2 cells. But now you are wanting a limitatino that only 1 date
can be had, either O5 or R5. Well, assuming O5 and R5 would be entered by the
user, then your formula would be exactly the same, but you would want to use
Data Validation on O5 and R5.
O5 data validation (Data--Validation), choose custom, and then in the
formula box type =$R$5=""
for R5 type =$O$5=""
If you try to work these checks into each formula, you will run into
circular references. If this isn't the solution to your question, post back
and let us know what your expectations based on the data (and how the data is
entered).
--
** John C **
Please remember, if your question is answered, to check the YES box below.
It helps everyone.


"HeatherBelle" wrote:

I want the following to happen:
If O5 is blank, then P5 will be also (this much is done in the formula below)
If O5 has a date, then the below function will be done (also done)
If Q5 gets populated, then the function will stop (also done)
However, I want to now add something that will perform the same
function/situations in P5 if <bR5</b has a date (O5 and R5 will NOT both
have dates in them)

=IF(O5="","",IF(Q5="",DAYS360(O5,TODAY()),DAYS360( O5,Q5)))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default An either/or function

Here is a sample from my workbook: (Yes, my columns have changed, I've added
another column since I posted earlier)

P Q R S
Date to AOV Days Out Effective Date Denial Date
02/15/08 ???? 03/05/08
1/31/07 ???? 3/01/07

I don't want anything to show in Q if P is blank (otherwise, I get a really
large number sitting there because there's no data for it to compute)
I want the count to keep rolling until a date is put into either R OR S
(there will never be one in both)
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default An either/or function

=IF(P5="","",IF(AND(R5="",S5=""),DAYS360(P5,TODAY( )),IF(AND(R5<"",S5<""),"Error",DAYS360(P5,IF(R5= "",S5,R5)))))

I think this is what you want. Hope it helps :)
--
** John C **


"HeatherBelle" wrote:

Here is a sample from my workbook: (Yes, my columns have changed, I've added
another column since I posted earlier)

P Q R S
Date to AOV Days Out Effective Date Denial Date
02/15/08 ???? 03/05/08
1/31/07 ???? 3/01/07

I don't want anything to show in Q if P is blank (otherwise, I get a really
large number sitting there because there's no data for it to compute)
I want the count to keep rolling until a date is put into either R OR S
(there will never be one in both)



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default An either/or function

Perfect! Thanks!!

"John C" wrote:

=IF(P5="","",IF(AND(R5="",S5=""),DAYS360(P5,TODAY( )),IF(AND(R5<"",S5<""),"Error",DAYS360(P5,IF(R5= "",S5,R5)))))

I think this is what you want. Hope it helps :)
--
** John C **


"HeatherBelle" wrote:

Here is a sample from my workbook: (Yes, my columns have changed, I've added
another column since I posted earlier)

P Q R S
Date to AOV Days Out Effective Date Denial Date
02/15/08 ???? 03/05/08
1/31/07 ???? 3/01/07

I don't want anything to show in Q if P is blank (otherwise, I get a really
large number sitting there because there's no data for it to compute)
I want the count to keep rolling until a date is put into either R OR S
(there will never be one in both)

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default An either/or function

You are welcome, and thanks for the feedback.
--
** John C **
Please remember, if your question is answered, to check the YES box below.
It helps everyone.


"HeatherBelle" wrote:

Perfect! Thanks!!

"John C" wrote:

=IF(P5="","",IF(AND(R5="",S5=""),DAYS360(P5,TODAY( )),IF(AND(R5<"",S5<""),"Error",DAYS360(P5,IF(R5= "",S5,R5)))))

I think this is what you want. Hope it helps :)
--
** John C **


"HeatherBelle" wrote:

Here is a sample from my workbook: (Yes, my columns have changed, I've added
another column since I posted earlier)

P Q R S
Date to AOV Days Out Effective Date Denial Date
02/15/08 ???? 03/05/08
1/31/07 ???? 3/01/07

I don't want anything to show in Q if P is blank (otherwise, I get a really
large number sitting there because there's no data for it to compute)
I want the count to keep rolling until a date is put into either R OR S
(there will never be one in both)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISBLANK function not working when cell is blank dut to function re mcmilja Excel Discussion (Misc queries) 9 May 7th 23 03:43 AM
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"