Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Bonnie W.
 
Posts: n/a
Default LEFT &RIGHT formula on the same cell

I was trying to take off hyphen within a text string, such as "0100-00-000".
I used LEFT formula to return the first 4 digit. Then I used RIGHT formula
on the same cell to return the last 3 digit but somehow the formula doesn't
work. It won't give me a error message but just keep my formula in the cell.

Please help and thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default LEFT &RIGHT formula on the same cell

Format the cell as General and re-enter the formula.
If you post again, do supply the formula.

--
Kind regards,

Niek Otten

"Bonnie W." <Bonnie wrote in message
...
I was trying to take off hyphen within a text string, such as
"0100-00-000".
I used LEFT formula to return the first 4 digit. Then I used RIGHT formula
on the same cell to return the last 3 digit but somehow the formula
doesn't
work. It won't give me a error message but just keep my formula in the
cell.

Please help and thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
Kevin B
 
Posts: n/a
Default LEFT &RIGHT formula on the same cell

Assuming that the string value is in A1, the following formula will strip the
hyphens from the value:

=LEFT(A1,FIND("-",A1,1)-1)&MID(A1,FIND("-",A1,1)+1,FIND("-",A1,FIND("-",A1,1)+1)-(FIND("-",A1,1)+1))&RIGHT(A1,3)
--
Kevin Backmann


"Bonnie W." wrote:

I was trying to take off hyphen within a text string, such as "0100-00-000".
I used LEFT formula to return the first 4 digit. Then I used RIGHT formula
on the same cell to return the last 3 digit but somehow the formula doesn't
work. It won't give me a error message but just keep my formula in the cell.

Please help and thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
Sloth
 
Posts: n/a
Default LEFT &RIGHT formula on the same cell

If you are not getting an error message, and you can see the formula after
entered, then you probably have the cell formatted as text. Format it as
general, and then re-edit the cell (select the cell, hit F2, hit enter).

Also, you can try this formula. It will remove all "-" from the text string.

=SUBSTITUTE(A1,"-","")

"Bonnie W." wrote:

I was trying to take off hyphen within a text string, such as "0100-00-000".
I used LEFT formula to return the first 4 digit. Then I used RIGHT formula
on the same cell to return the last 3 digit but somehow the formula doesn't
work. It won't give me a error message but just keep my formula in the cell.

Please help and thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
Danny@Kendal
 
Posts: n/a
Default LEFT &RIGHT formula on the same cell

"Bonnie W." <Bonnie wrote in message
...
I was trying to take off hyphen within a text string, such as
"0100-00-000".
I used LEFT formula to return the first 4 digit. Then I used RIGHT formula
on the same cell to return the last 3 digit but somehow the formula
doesn't
work. It won't give me a error message but just keep my formula in the
cell.


If the cell is formatted as 'text' then you'll need to change it to
'general' and then edit the formula to refresh it.

If you just want to remove the dashes from the string then try
=SUBSTITUTE(A1,"-","")

This returns the value as a string. If you want it to be interpreted as a
number then add two minus signs like this
=--SUBSTITUTE(A1,"-","")




  #6   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default LEFT &RIGHT formula on the same cell

If all you want to do is eliminate the hyphens, you can do that with the Edit
Replace Replace hyphen with nothing (leave blank) Replace all


Vaya con Dios,
Chuck, CABGx3


"Bonnie W." wrote:

I was trying to take off hyphen within a text string, such as "0100-00-000".
I used LEFT formula to return the first 4 digit. Then I used RIGHT formula
on the same cell to return the last 3 digit but somehow the formula doesn't
work. It won't give me a error message but just keep my formula in the cell.

Please help and thanks

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
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
How do I set a cell value based on a formula in another cell? dingy101 Excel Discussion (Misc queries) 1 November 21st 05 08:51 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
adding a formula in a cell but when cell = 0 cell is blank Mike T Excel Worksheet Functions 5 May 31st 05 01:08 AM
Excel VB-Copy formula down until adjacent cell (left) is blank? Tony P. Excel Discussion (Misc queries) 1 May 18th 05 06:11 PM


All times are GMT +1. The time now is 12:18 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"