Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 59
Default If 5th character="-" delete everything to the left otherwise do no

Hi -
I can't seem to figure this out, I bet it is pretty easy. Can anyone assist?

The text is in A1.

Thanks,
Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default If 5th character="-" delete everything to the left otherwise do no

Try
=IF(MID(A1,5,1)="-",RIGHT(A1,(LEN(A1)-5)),A1)

"Mike R." wrote:

Hi -
I can't seem to figure this out, I bet it is pretty easy. Can anyone assist?

The text is in A1.

Thanks,
Mike

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default If 5th character="-" delete everything to the left otherwise do no

You really should put your main question in the white box, not in the header.

=IF(LEN(A1)<5,A1,IF(MID(A1,5,1)="-",RIGHT(A1,LEN(A1)-5),A1))
--
** John C **


"Mike R." wrote:

Hi -
I can't seem to figure this out, I bet it is pretty easy. Can anyone assist?

The text is in A1.

Thanks,
Mike

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default If 5th character="-" delete everything to the left otherwise dono

Try this:

=IF(MID(A1,5,1)="-",RIGHT(A1,LEN(A1)-5),A1)

Hope this helps.

Pete

On Nov 12, 3:55*pm, Mike R. wrote:
Hi -
I can't seem to figure this out, I bet it is pretty easy. *Can anyone assist?

The text is in A1.

Thanks,
Mike


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default If 5th character="-" delete everything to the left otherwise do no

Firstly, please ask the question in the body of the message. If you ask it
in the subject line, as you tried to do, it will probably be trunc.....

By "do no", do you mean include A1 unaltered?
By "delete everything to the left" do you mean that you want to output
everything to the right of the hyphen?

Try =IF(MID(A1,5,1)="-",MID(A1,6,9999),A1)
If you want to include the hyphen in the output, and just lose the preceding
4 characters, then try
=IF(MID(A13,5,1)="-",MID(A13,5,9999),A13)
--
David Biddulph

"Mike R." wrote in message
...
Hi -
I can't seem to figure this out, I bet it is pretty easy. Can anyone
assist?

The text is in A1.

Thanks,
Mike





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default If 5th character="-" delete everything to the left otherwise do no

Hi,

Try

=MID(A1,IF(MID(A1,5,1)="-",6,1),99)

Cheers,
Shane Devenshire

"Mike R." wrote:

Hi -
I can't seem to figure this out, I bet it is pretty easy. Can anyone assist?

The text is in A1.

Thanks,
Mike

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default If 5th character="-" delete everything to the left otherwise do no

=MID(A1,IF(MID(A1,5,1)="-",6,1),99)

Stated another way...

=MID(A1,1+5*(MID(A1,5,1)="-"),99)

--
Rick (MVP - Excel)
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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Excel "Move or Copy" and "Delete" sheet functions dsiama Excel Worksheet Functions 1 December 28th 07 02:57 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 01:55 AM.

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

About Us

"It's about Microsoft Excel"