I have days off in the P column in this format: Sat/Sun
I'm using them in another column in this format SatSun, so I'm using this
formula:
=LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
However, I have some days off that just have Sun, which produces SunSun.
How can the formula be writen to produce SatSun when two days are showing,
and only Sun when one day is showing ?
Thanks,
Steve
|
|
0
|
|
|
|
Reply
|
Utf
|
3/11/2010 4:45:02 PM |
|
Use Substitute, as in:
=Substitute(P21,"/","")
Regards,
Fred
"Steve" <Steve@discussions.microsoft.com> wrote in message
news:D1729A01-069B-4F49-BE64-678E1C6E3788@microsoft.com...
>I have days off in the P column in this format: Sat/Sun
> I'm using them in another column in this format SatSun, so I'm using this
> formula:
> =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> However, I have some days off that just have Sun, which produces SunSun.
> How can the formula be writen to produce SatSun when two days are showing,
> and only Sun when one day is showing ?
>
> Thanks,
>
> Steve
|
|
0
|
|
|
|
Reply
|
Fred
|
3/11/2010 4:51:23 PM
|
|
Steve wrote:
> I have days off in the P column in this format: Sat/Sun
> I'm using them in another column in this format SatSun, so I'm using this
> formula:
> =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> However, I have some days off that just have Sun, which produces SunSun.
> How can the formula be writen to produce SatSun when two days are showing,
> and only Sun when one day is showing ?
>
> Thanks,
>
> Steve
=IF(LEN(P21)=7,LEFT(P21,3)&RIGHT(P21,3),P21)
|
|
0
|
|
|
|
Reply
|
Glenn
|
3/11/2010 4:53:35 PM
|
|
Yes, much better!
Fred Smith wrote:
> Use Substitute, as in:
> =Substitute(P21,"/","")
>
> Regards,
> Fred
>
> "Steve" <Steve@discussions.microsoft.com> wrote in message
> news:D1729A01-069B-4F49-BE64-678E1C6E3788@microsoft.com...
>> I have days off in the P column in this format: Sat/Sun
>> I'm using them in another column in this format SatSun, so I'm using this
>> formula:
>> =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
>> However, I have some days off that just have Sun, which produces SunSun.
>> How can the formula be writen to produce SatSun when two days are
>> showing,
>> and only Sun when one day is showing ?
>>
>> Thanks,
>>
>> Steve
>
|
|
0
|
|
|
|
Reply
|
Glenn
|
3/11/2010 4:57:34 PM
|
|
=if(len(P21)>3,LEFT(P21,3)&RIGHT(P21,3),P21)
Assumes that cell P21 has nothing in it but either Sat, Sun, or Sat...Sun
HTH,
Keith
"Steve" wrote:
> I have days off in the P column in this format: Sat/Sun
> I'm using them in another column in this format SatSun, so I'm using this
> formula:
> =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> However, I have some days off that just have Sun, which produces SunSun.
> How can the formula be writen to produce SatSun when two days are showing,
> and only Sun when one day is showing ?
>
> Thanks,
>
> Steve
|
|
0
|
|
|
|
Reply
|
Utf
|
3/11/2010 5:19:02 PM
|
|
Thanks,
Works great, but I'm getting zeros now in the cells when there is nothing in
the P column cells, which is a lot. How can I eleminate the zeros if nothing
is in the P column cell ?
"ker_01" wrote:
> =if(len(P21)>3,LEFT(P21,3)&RIGHT(P21,3),P21)
>
> Assumes that cell P21 has nothing in it but either Sat, Sun, or Sat...Sun
>
> HTH,
> Keith
>
> "Steve" wrote:
>
> > I have days off in the P column in this format: Sat/Sun
> > I'm using them in another column in this format SatSun, so I'm using this
> > formula:
> > =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> > However, I have some days off that just have Sun, which produces SunSun.
> > How can the formula be writen to produce SatSun when two days are showing,
> > and only Sun when one day is showing ?
> >
> > Thanks,
> >
> > Steve
|
|
0
|
|
|
|
Reply
|
Utf
|
3/11/2010 6:23:01 PM
|
|
Thanks,
Works great, but I'm getting zeros now in the cells when there is nothing in
the P column cells, which is a lot. How can I eleminate the zeros if nothing
is in the P column cell ?
"Glenn" wrote:
> Steve wrote:
> > I have days off in the P column in this format: Sat/Sun
> > I'm using them in another column in this format SatSun, so I'm using this
> > formula:
> > =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> > However, I have some days off that just have Sun, which produces SunSun.
> > How can the formula be writen to produce SatSun when two days are showing,
> > and only Sun when one day is showing ?
> >
> > Thanks,
> >
> > Steve
>
> =IF(LEN(P21)=7,LEFT(P21,3)&RIGHT(P21,3),P21)
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
3/11/2010 6:23:02 PM
|
|
I don't understand where to put this in my regular formula.
Thanks,
Steve
"Fred Smith" wrote:
> Use Substitute, as in:
> =Substitute(P21,"/","")
>
> Regards,
> Fred
>
> "Steve" <Steve@discussions.microsoft.com> wrote in message
> news:D1729A01-069B-4F49-BE64-678E1C6E3788@microsoft.com...
> >I have days off in the P column in this format: Sat/Sun
> > I'm using them in another column in this format SatSun, so I'm using this
> > formula:
> > =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> > However, I have some days off that just have Sun, which produces SunSun.
> > How can the formula be writen to produce SatSun when two days are showing,
> > and only Sun when one day is showing ?
> >
> > Thanks,
> >
> > Steve
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
3/11/2010 6:24:01 PM
|
|
It doesn't go in your regular formula, it replaces it.
Steve wrote:
> I don't understand where to put this in my regular formula.
> Thanks,
>
> Steve
>
> "Fred Smith" wrote:
>
>> Use Substitute, as in:
>> =Substitute(P21,"/","")
>>
>> Regards,
>> Fred
>>
>> "Steve" <Steve@discussions.microsoft.com> wrote in message
>> news:D1729A01-069B-4F49-BE64-678E1C6E3788@microsoft.com...
>>> I have days off in the P column in this format: Sat/Sun
>>> I'm using them in another column in this format SatSun, so I'm using this
>>> formula:
>>> =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
>>> However, I have some days off that just have Sun, which produces SunSun.
>>> How can the formula be writen to produce SatSun when two days are showing,
>>> and only Sun when one day is showing ?
>>>
>>> Thanks,
>>>
>>> Steve
>> .
>>
|
|
0
|
|
|
|
Reply
|
Glenn
|
3/11/2010 8:45:31 PM
|
|
Duh!!
I guess it helps if I spell SUBSTITUTE correctly.
Thanks,
Steve
"Glenn" wrote:
> It doesn't go in your regular formula, it replaces it.
>
> Steve wrote:
> > I don't understand where to put this in my regular formula.
> > Thanks,
> >
> > Steve
> >
> > "Fred Smith" wrote:
> >
> >> Use Substitute, as in:
> >> =Substitute(P21,"/","")
> >>
> >> Regards,
> >> Fred
> >>
> >> "Steve" <Steve@discussions.microsoft.com> wrote in message
> >> news:D1729A01-069B-4F49-BE64-678E1C6E3788@microsoft.com...
> >>> I have days off in the P column in this format: Sat/Sun
> >>> I'm using them in another column in this format SatSun, so I'm using this
> >>> formula:
> >>> =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> >>> However, I have some days off that just have Sun, which produces SunSun.
> >>> How can the formula be writen to produce SatSun when two days are showing,
> >>> and only Sun when one day is showing ?
> >>>
> >>> Thanks,
> >>>
> >>> Steve
> >> .
> >>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
3/11/2010 9:43:01 PM
|
|
Very nice. And clean too.
Thanks much,
Steve
"Fred Smith" wrote:
> Use Substitute, as in:
> =Substitute(P21,"/","")
>
> Regards,
> Fred
>
> "Steve" <Steve@discussions.microsoft.com> wrote in message
> news:D1729A01-069B-4F49-BE64-678E1C6E3788@microsoft.com...
> >I have days off in the P column in this format: Sat/Sun
> > I'm using them in another column in this format SatSun, so I'm using this
> > formula:
> > =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> > However, I have some days off that just have Sun, which produces SunSun.
> > How can the formula be writen to produce SatSun when two days are showing,
> > and only Sun when one day is showing ?
> >
> > Thanks,
> >
> > Steve
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
3/11/2010 9:44:01 PM
|
|
You're welcome. Thanks for the feedback.
Fred.
"Steve" <Steve@discussions.microsoft.com> wrote in message
news:9B56F454-93C8-4610-97BB-28AE0B42C503@microsoft.com...
> Very nice. And clean too.
>
> Thanks much,
>
> Steve
>
> "Fred Smith" wrote:
>
>> Use Substitute, as in:
>> =Substitute(P21,"/","")
>>
>> Regards,
>> Fred
>>
>> "Steve" <Steve@discussions.microsoft.com> wrote in message
>> news:D1729A01-069B-4F49-BE64-678E1C6E3788@microsoft.com...
>> >I have days off in the P column in this format: Sat/Sun
>> > I'm using them in another column in this format SatSun, so I'm using
>> > this
>> > formula:
>> > =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
>> > However, I have some days off that just have Sun, which produces
>> > SunSun.
>> > How can the formula be writen to produce SatSun when two days are
>> > showing,
>> > and only Sun when one day is showing ?
>> >
>> > Thanks,
>> >
>> > Steve
>>
>> .
>>
|
|
0
|
|
|
|
Reply
|
Fred
|
3/11/2010 11:41:28 PM
|
|
=if(len(P21)>3,LEFT(P21,3)&RIGHT(P21,3),If(len(P21)>0,P21,""))
aircode, so double check the paran placement, but this takes care of the
"empty cells equal zero" problem.
"Steve" wrote:
> Thanks,
>
> Works great, but I'm getting zeros now in the cells when there is nothing in
> the P column cells, which is a lot. How can I eleminate the zeros if nothing
> is in the P column cell ?
>
> "ker_01" wrote:
>
> > =if(len(P21)>3,LEFT(P21,3)&RIGHT(P21,3),P21)
> >
> > Assumes that cell P21 has nothing in it but either Sat, Sun, or Sat...Sun
> >
> > HTH,
> > Keith
> >
> > "Steve" wrote:
> >
> > > I have days off in the P column in this format: Sat/Sun
> > > I'm using them in another column in this format SatSun, so I'm using this
> > > formula:
> > > =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> > > However, I have some days off that just have Sun, which produces SunSun.
> > > How can the formula be writen to produce SatSun when two days are showing,
> > > and only Sun when one day is showing ?
> > >
> > > Thanks,
> > >
> > > Steve
|
|
0
|
|
|
|
Reply
|
Utf
|
3/12/2010 12:21:01 AM
|
|
That'll do it.
Thank you,
Steve
"ker_01" wrote:
>
> =if(len(P21)>3,LEFT(P21,3)&RIGHT(P21,3),If(len(P21)>0,P21,""))
> aircode, so double check the paran placement, but this takes care of the
> "empty cells equal zero" problem.
>
> "Steve" wrote:
>
> > Thanks,
> >
> > Works great, but I'm getting zeros now in the cells when there is nothing in
> > the P column cells, which is a lot. How can I eleminate the zeros if nothing
> > is in the P column cell ?
> >
> > "ker_01" wrote:
> >
> > > =if(len(P21)>3,LEFT(P21,3)&RIGHT(P21,3),P21)
> > >
> > > Assumes that cell P21 has nothing in it but either Sat, Sun, or Sat...Sun
> > >
> > > HTH,
> > > Keith
> > >
> > > "Steve" wrote:
> > >
> > > > I have days off in the P column in this format: Sat/Sun
> > > > I'm using them in another column in this format SatSun, so I'm using this
> > > > formula:
> > > > =LEFT(P21,3)&RIGHT(P21,3), which produces SatSun
> > > > However, I have some days off that just have Sun, which produces SunSun.
> > > > How can the formula be writen to produce SatSun when two days are showing,
> > > > and only Sun when one day is showing ?
> > > >
> > > > Thanks,
> > > >
> > > > Steve
|
|
0
|
|
|
|
Reply
|
Utf
|
3/15/2010 4:30:01 PM
|
|
|
13 Replies
189 Views
(page loaded in 0.448 seconds)
|