Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gardenhead
 
Posts: n/a
Default Find/Replace last couple of digits on number

Hello,

I'm trying to figure out if there's a way to find and replace the last
two digits on a list of invoice #s if they end with a 01 (replacing
them with nothing). Here's a sample list:

190369734601
190369734701
190369734801
64853
CM1903717092
DM902651322
I1903517714
I90351095901
I90351095902

Can't use the =Left function because the length of the invoice #s
varies. Currently I'm copying the list to a text editor that recognizes
carriage returns so I can find/replace 01<carriage return and then
copy it back to the wksht. It'd be nice if I could find a way to work
it into a macro though. I realize that legitimate invoice numbers may
be affected but they should easily be identified by the difference in
size.

Thanks...

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Marcelo
 
Posts: n/a
Default Find/Replace last couple of digits on number

hi, try

=if(right(a2,2)="01",mid(a2,1,len(a2)-2),a2)



hth
regards from Brazil
Marcelo

"gardenhead" escreveu:

Hello,

I'm trying to figure out if there's a way to find and replace the last
two digits on a list of invoice #s if they end with a 01 (replacing
them with nothing). Here's a sample list:

190369734601
190369734701
190369734801
64853
CM1903717092
DM902651322
I1903517714
I90351095901
I90351095902

Can't use the =Left function because the length of the invoice #s
varies. Currently I'm copying the list to a text editor that recognizes
carriage returns so I can find/replace 01<carriage return and then
copy it back to the wksht. It'd be nice if I could find a way to work
it into a macro though. I realize that legitimate invoice numbers may
be affected but they should easily be identified by the difference in
size.

Thanks...


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gardenhead
 
Posts: n/a
Default Find/Replace last couple of digits on number

thanks Marcelo - that worked great, now I get to figure out how you did
it :D

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Marcelo
 
Posts: n/a
Default Find/Replace last couple of digits on number

thanks for the feedback



"gardenhead" escreveu:

thanks Marcelo - that worked great, now I get to figure out how you did
it :D


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
number changing digits on paste from web apx file field Todd F. Excel Discussion (Misc queries) 0 March 15th 06 03:49 PM
maximum number size/significant digits noel Excel Discussion (Misc queries) 4 February 20th 06 03:42 PM
how do i increase the number of digits displayed ameen Excel Discussion (Misc queries) 3 May 13th 05 08:22 PM
How do I format cells to a specific number of digits? Gabriele Excel Discussion (Misc queries) 3 February 5th 05 03:17 PM
How to format a number in Indian style in Excel? Victor_alb Excel Discussion (Misc queries) 2 December 21st 04 04:21 AM


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

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"