Formula

  • Thread starter Thread starter DaveB
  • Start date Start date
D

DaveB

My first field is G2

205,801

I'm trying to get it read:

205

Is this formula correct: =LEFT(G2,SEARCH(",",G2)-1)

It did not work. Thanks again. DaveB

Subject: Re: Formula
From: "Dan E" <[email protected]>
Sent: 10/22/2003 9:16:26 AM

=LEFT(A1,SEARCH(",",A1)-1)

Dan E

I am trying to delete all numbers to right of ",". Can you
share the code. Thanks in advance.

From:
201,076
15,006
6,985

To:
201
15
7
DaveB
 
Dave

It's a number so the comma is only shown in the displayed value. The cell
actually contains 205801

Try:

=VALUE(LEFT(A1,3))

That works for this value with six digits but if you need something more
general you could try this:

=VALUE(LEFT(TEXT(G2,"000,000"),SEARCH(",",TEXT(G2,"000,000"))-1))

Regards

Trevor
 
Back
Top