ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula (https://www.excelbanter.com/excel-programming/280289-formula.html)

DaveB[_2_]

Formula
 
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: Formula
From: "Dan E"
Sent: 10/22/2003 9:16:26 AM

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

Dan E

"DaveB" wrote in message
...
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

Trevor Shuttleworth

Formula
 
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


"DaveB" wrote in message
...
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: Formula
From: "Dan E"
Sent: 10/22/2003 9:16:26 AM

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

Dan E

"DaveB" wrote in message
...
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





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

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