ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   first 0 (https://www.excelbanter.com/excel-programming/369236-first-0-a.html)

delmac

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

Bob Phillips

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




Niek Otten

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



Charlie

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


delmac

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



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com