A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

left/right or center ?



 
 
Thread Tools Display Modes
  #1  
Old March 11th, 2010, 04:45 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default left/right or center ?

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
  #2  
Old March 11th, 2010, 04:51 PM posted to microsoft.public.excel.worksheet.functions
Fred Smith[_4_]
external usenet poster
 
Posts: 2,386
Default left/right or center ?

Use Substitute, as in:
=Substitute(P21,"/","")

Regards,
Fred

"Steve" wrote in message
news
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


  #3  
Old March 11th, 2010, 04:53 PM posted to microsoft.public.excel.worksheet.functions
Glenn[_6_]
external usenet poster
 
Posts: 1,245
Default left/right or center ?

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)
  #4  
Old March 11th, 2010, 04:57 PM posted to microsoft.public.excel.worksheet.functions
Glenn[_6_]
external usenet poster
 
Posts: 1,245
Default left/right or center ?

Yes, much better!

Fred Smith wrote:
Use Substitute, as in:
=Substitute(P21,"/","")

Regards,
Fred

"Steve" wrote in message
news
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


  #5  
Old March 11th, 2010, 05:19 PM posted to microsoft.public.excel.worksheet.functions
ker_01
external usenet poster
 
Posts: 87
Default left/right or center ?

=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

  #6  
Old March 11th, 2010, 06:23 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default left/right or center ?

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

  #7  
Old March 11th, 2010, 06:23 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default left/right or center ?

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)
.

  #8  
Old March 11th, 2010, 06:24 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default left/right or center ?

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" wrote in message
news
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


.

  #9  
Old March 11th, 2010, 08:45 PM posted to microsoft.public.excel.worksheet.functions
Glenn[_6_]
external usenet poster
 
Posts: 1,245
Default left/right or center ?

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" wrote in message
news
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

.

  #10  
Old March 11th, 2010, 09:43 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default left/right or center ?

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" wrote in message
news 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
.

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.