#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default 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



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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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