#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default first 0

Hi all ihave a column of numbers like
00022230013A
00111110007A
00044440132A and I need to find the first 0 from the right in each number,
can anyone please help. Ta.
--
delmac
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default first 0

Do you mean find its position in the string?

=FIND("~",SUBSTITUTE(A1,"0","~",LEN(A1)-LEN(SUBSTITUTE(A1,"0",""))))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"delmac" wrote in message
...
Hi all ihave a column of numbers like
00022230013A
00111110007A
00044440132A and I need to find the first 0 from the right in each number,
can anyone please help. Ta.
--
delmac



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default first 0

=FIND("#",SUBSTITUTE(A1,0,"#",LEN(A1)-LEN(SUBSTITUTE(A1,0,""))))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"delmac" wrote in message ...
| Hi all ihave a column of numbers like
| 00022230013A
| 00111110007A
| 00044440132A and I need to find the first 0 from the right in each number,
| can anyone please help. Ta.
| --
| delmac


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default first 0

to find the position using VB:

Dim iPos As Long
Dim MyString As String
iPos = InStrRev(MyString, "0")


"delmac" wrote:

Hi all ihave a column of numbers like
00022230013A
00111110007A
00044440132A and I need to find the first 0 from the right in each number,
can anyone please help. Ta.
--
delmac

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default first 0

tried this and got nothing Charlie, thanks though.
--
delmac


"Charlie" wrote:

to find the position using VB:

Dim iPos As Long
Dim MyString As String
iPos = InStrRev(MyString, "0")


"delmac" wrote:

Hi all ihave a column of numbers like
00022230013A
00111110007A
00044440132A and I need to find the first 0 from the right in each number,
can anyone please help. Ta.
--
delmac

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



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