Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default left/right or center ?

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

Regards,
Fred

"Steve" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default left/right or center ?

Yes, much better!

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

Regards,
Fred

"Steve" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 395
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
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
...
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
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
...
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
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
...
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
.

.



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default left/right or center ?

Very nice. And clean too.

Thanks much,

Steve

"Fred Smith" wrote:

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

Regards,
Fred

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


.

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default left/right or center ?

You're welcome. Thanks for the feedback.

Fred.

"Steve" wrote in message
...
Very nice. And clean too.

Thanks much,

Steve

"Fred Smith" wrote:

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

Regards,
Fred

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


.


  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 395
Default left/right or center ?


=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

  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default left/right or center ?

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

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
Merge and Center and Center Accross Selection Bojingles03 New Users to Excel 3 March 17th 09 07:05 PM
merged cells don't center over columns to repeat at left trimatrixlabs Excel Discussion (Misc queries) 0 September 25th 06 04:39 PM
How do I left justify center section header nick Excel Discussion (Misc queries) 1 September 6th 06 09:30 PM
Want to use left and center footer in same page wjs-matt Charts and Charting in Excel 1 January 7th 06 02:18 AM
Want to use left and center footer on same page wjs-matt Excel Discussion (Misc queries) 1 January 6th 06 05:15 PM


All times are GMT +1. The time now is 04:22 PM.

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"