Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
toolman
 
Posts: n/a
Default How can i find and change a value in a cell place?

I have part numbers that have 1 or 3 letters followed by 5 numbers. B01234,
or COM12345. I want to right a formula that if the 1st number following the
letter is a 0, replace it with a space. If it is a 1 do nothing.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default How can i find and change a value in a cell place?

With the part # in A1:

=IF(MID(A1,2,1)="0",LEFT(A1,1)&"
"&MID(A1,3,255),IF(MID(A1,4,1)="0",LEFT(A1,3)& " "&MID(A1,5,255),A1))

Duke

"toolman" wrote:

I have part numbers that have 1 or 3 letters followed by 5 numbers. B01234,
or COM12345. I want to right a formula that if the 1st number following the
letter is a 0, replace it with a space. If it is a 1 do nothing.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default How can i find and change a value in a cell place?

toolman -

Be careful with that formula. It will give incorrect results for part #s like

B11011

Try this instead:

=IF(MID(A2,2,1)="0",LEFT(A2,1)&"
"&MID(A2,3,255),IF(AND(ISERROR(VALUE(MID(A2,2,1))) ,MID(A2,4,1)="0"),LEFT(A2,3)&" "&MID(A2,5,255),A2))



"Duke Carey" wrote:

With the part # in A1:

=IF(MID(A1,2,1)="0",LEFT(A1,1)&"
"&MID(A1,3,255),IF(MID(A1,4,1)="0",LEFT(A1,3)& " "&MID(A1,5,255),A1))

Duke

"toolman" wrote:

I have part numbers that have 1 or 3 letters followed by 5 numbers. B01234,
or COM12345. I want to right a formula that if the 1st number following the
letter is a 0, replace it with a space. If it is a 1 do nothing.

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
Change the appearance cell where Find criteria is found in a cell Tomszar Excel Discussion (Misc queries) 3 December 30th 05 02:48 PM
Find function alamo Excel Worksheet Functions 1 September 16th 05 02:01 PM
conditional cell shading when a change occurs zooeyhall Excel Discussion (Misc queries) 1 June 6th 05 05:14 PM
Look for change next blank cell in Range Nigel Bennett Excel Worksheet Functions 1 March 13th 05 09:45 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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