ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Nested IF function (https://www.excelbanter.com/excel-worksheet-functions/214242-nested-if-function.html)

PWK

Nested IF function
 
Hello All

=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun","M on",D2)))

I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions.
Thanks for your help.

Don Guillett

Nested IF function
 
is D2 a proper date or is it text?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"PWK" wrote in message
...
Hello All

=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun","M on",D2)))

I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions.
Thanks for your help.



PWK

Nested IF function
 
On Dec 19, 8:26*am, "Don Guillett" wrote:
is D2 a proper date or is it text?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"PWK" wrote in message

...



Hello All


=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun","M on",D2)))


I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions.
Thanks for your help.- Hide quoted text -


- Show quoted text -


Don,
Thanks for your reply.
It is a date, in this case 11/13/2008

Mike H

Nested IF function
 
Hi,

Try this and format as DDD

=IF(ISNUMBER(D2),MAX(WEEKDAY(2),WEEKDAY(D2)),"")


Mike

"PWK" wrote:

Hello All

=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun","M on",D2)))

I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions.
Thanks for your help.


PWK

Nested IF function
 
On Dec 19, 8:37*am, PWK wrote:
On Dec 19, 8:26*am, "Don Guillett" wrote:





is D2 a proper date or is it text?


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"PWK" wrote in message


....


Hello All


=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun","M on",D2)))


I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions.
Thanks for your help.- Hide quoted text -


- Show quoted text -


Don,
Thanks for your reply.
It is a date, in this case 11/13/2008- Hide quoted text -

- Show quoted text -


Let me add to this. My formula is in cell L2 my formula should read
=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(L2="Sun","M on",L2))) as I said
I am confused.

David Biddulph[_2_]

Nested IF function
 
It sounds as if what you want is
=IF(ISBLANK(D2),"",IF(TEXT(D2+3,"ddd")="Sun","Mon" ,TEXT(D2+3,"ddd")))

The principle of nesting is pretty easy. You just replace an argument of a
function by another function.

You started with
=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"))

Then replace
TEXT(D2+3,"ddd")
with
IF(TEXT(D2+3,"ddd")="Sun","Mon",TEXT(D2+3,"ddd"))
--
David Biddulph

"PWK" wrote in message
...
Hello All

=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun","M on",D2)))

I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions.
Thanks for your help.




Ron Rosenfeld

Nested IF function
 
On Fri, 19 Dec 2008 05:17:58 -0800 (PST), PWK
wrote:

Hello All

=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun"," Mon",D2)))

I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions.
Thanks for your help.



Try:

=IF(ISBLANK(D2),"",TEXT(D2+3+(WEEKDAY(D2+3)=1),"dd d"))

--ron

Don Guillett

Nested IF function
 
Please TOP post. A formula in cell L2 cannot change itself. You need to give
a better explanation.

Let me add to this. My formula is in cell L2 my formula should read
=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(L2="Sun","M on",L2))) as I said
I am confused.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"PWK" wrote in message
...
On Dec 19, 8:37 am, PWK wrote:
On Dec 19, 8:26 am, "Don Guillett" wrote:





is D2 a proper date or is it text?


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"PWK" wrote in
message


...


Hello All


=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun","M on",D2)))


I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions.
Thanks for your help.- Hide quoted text -


- Show quoted text -


Don,
Thanks for your reply.
It is a date, in this case 11/13/2008- Hide quoted text -

- Show quoted text -


Let me add to this. My formula is in cell L2 my formula should read
=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(L2="Sun","M on",L2))) as I said
I am confused.


PWK

Nested IF function
 
On Dec 19, 8:44*am, PWK wrote:
On Dec 19, 8:37*am, PWK wrote:





On Dec 19, 8:26*am, "Don Guillett" wrote:


is D2 a proper date or is it text?


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"PWK" wrote in message


....


Hello All


=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun","M on",D2)))


I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions..
Thanks for your help.- Hide quoted text -


- Show quoted text -


Don,
Thanks for your reply.
It is a date, in this case 11/13/2008- Hide quoted text -


- Show quoted text -


Let me add to this. *My formula is in *cell L2 *my formula should read
=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(L2="Sun","M on",L2))) as I said
I am confused.- Hide quoted text -

- Show quoted text -


Thanks, Don

You put me in the right direction. My successful formula was =IF
(ISNUMBER(D2),MAX(WEEKDAY(2),WEEKDAY(D2+3)),"") Every day is a
learning experience. Thanks again.

PWK

Nested IF function
 
On Dec 19, 8:53*am, Ron Rosenfeld wrote:
On Fri, 19 Dec 2008 05:17:58 -0800 (PST), PWK
wrote:

Hello All


=IF(ISBLANK(D2),"",TEXT(D2+3,"ddd"),IF(D2="Sun"," Mon",D2)))


I am using this function in a worksheet to insert day of week. When
the day "Sun" occurs I want "Mon" to show in the cell instead (I get a
too many argument error). I get very confused with nested functions.
Thanks for your help.


Try:

=IF(ISBLANK(D2),"",TEXT(D2+3+(WEEKDAY(D2+3)=1),"dd d"))

--ron


Ron, Your formula worked also. Thanks to All



Ron Rosenfeld

Nested IF function
 
On Fri, 19 Dec 2008 06:36:18 -0800 (PST), PWK
wrote:

Ron, Your formula worked also. Thanks to All


You're welcome. Thanks for the feedback.
--ron

Harlan Grove[_2_]

Nested IF function
 
"Don Guillett" wrote...
Please TOP post. . . .


If you don't like bottom posting, why reply the second time?

Don Guillett

Nested IF function
 
Harlan,
Damn good question.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Harlan Grove" wrote in message
...
"Don Guillett" wrote...
Please TOP post. . . .


If you don't like bottom posting, why reply the second time?




All times are GMT +1. The time now is 11:36 PM.

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