Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Gordon Baxter
 
Posts: n/a
Default Help formatting cells

I have a column of numbers which I have imported from a website into a
spreadsheet.

Each cell has up to 8 characters. I want to discard everything but say the
first 4 chararcters.

Can this be done?

Gordon


  #2   Report Post  
Max
 
Posts: n/a
Default Help formatting cells

Assuming numbers in A1 down
Try in B1: =LEFT(TRIM(A1),4)+0
Copy down
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Gordon Baxter" wrote in message
...
I have a column of numbers which I have imported from a website into a
spreadsheet.

Each cell has up to 8 characters. I want to discard everything but say

the
first 4 chararcters.

Can this be done?

Gordon




  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default Help formatting cells

Add a helper column

=LEFT(A1,4)

and copy down

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gordon Baxter" wrote in message
...
I have a column of numbers which I have imported from a website into a
spreadsheet.

Each cell has up to 8 characters. I want to discard everything but say

the
first 4 chararcters.

Can this be done?

Gordon




  #4   Report Post  
Gordon Baxter
 
Posts: n/a
Default Help formatting cells

Excellent, both appear to work. Thanks.

This has given me another slight problem in that I am sometimes left with a
two digit number and a £ sign. Is there anyway I can format the cells to
delete the £ sign which appears in some cells?

Gordon


"Bob Phillips" wrote in message
...
Add a helper column

=LEFT(A1,4)

and copy down

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gordon Baxter" wrote in message
...
I have a column of numbers which I have imported from a website into a
spreadsheet.

Each cell has up to 8 characters. I want to discard everything but say

the
first 4 chararcters.

Can this be done?

Gordon






  #5   Report Post  
Max
 
Posts: n/a
Default Help formatting cells

"Gordon Baxter" wrote:
.. Is there anyway I can format the cells to
delete the £ sign which appears in some cells?


Try instead in B1, copied down:
=LEFT(SUBSTITUTE(TRIM(A1),"£",""),4)+0
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--




  #6   Report Post  
Gordon Baxter
 
Posts: n/a
Default Help formatting cells

No that doesn't work Max. Perhaps I have not explained it very well.

The following are samples of figures I get: 410 £2, 60 £19, 700 £4, 29 £36.

After reducing these down to the first four digits I am left with: 410, 60
£, 700, 29 £.

I am looking to get rid of the £ sign following the 60 & 29.

Regards
Gordon


"Max" wrote in message
...
"Gordon Baxter" wrote:
.. Is there anyway I can format the cells to
delete the £ sign which appears in some cells?


Try instead in B1, copied down:
=LEFT(SUBSTITUTE(TRIM(A1),"£",""),4)+0
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--




  #7   Report Post  
Max
 
Posts: n/a
Default Help formatting cells

Think we could put in B1, and copy down:
=LEFT(A1,SEARCH("£",A1)-1)+0
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Gordon Baxter" wrote in message
...
No that doesn't work Max. Perhaps I have not explained it very well.

The following are samples of figures I get: 410 £2, 60 £19, 700 £4, 29

£36.

After reducing these down to the first four digits I am left with: 410,

60
£, 700, 29 £.

I am looking to get rid of the £ sign following the 60 & 29.

Regards
Gordon



  #8   Report Post  
Bob Phillips
 
Posts: n/a
Default Help formatting cells

Gordon,

Another alternative

=LEFT(SUBSTITUTE(SUBSTITUTE(TRIM(B1),"£","")," ",""),4)+0

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gordon Baxter" wrote in message
...
No that doesn't work Max. Perhaps I have not explained it very well.

The following are samples of figures I get: 410 £2, 60 £19, 700 £4, 29

£36.

After reducing these down to the first four digits I am left with: 410,

60
£, 700, 29 £.

I am looking to get rid of the £ sign following the 60 & 29.

Regards
Gordon


"Max" wrote in message
...
"Gordon Baxter" wrote:
.. Is there anyway I can format the cells to
delete the £ sign which appears in some cells?


Try instead in B1, copied down:
=LEFT(SUBSTITUTE(TRIM(A1),"£",""),4)+0
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--






  #9   Report Post  
Bob Phillips
 
Posts: n/a
Default Help formatting cells

or even

=LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TRIM(A1),"£ ",""),CHAR(32),""),CHAR(16
0),""),4)+0

if it still isn't quite working

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gordon Baxter" wrote in message
...
No that doesn't work Max. Perhaps I have not explained it very well.

The following are samples of figures I get: 410 £2, 60 £19, 700 £4, 29

£36.

After reducing these down to the first four digits I am left with: 410,

60
£, 700, 29 £.

I am looking to get rid of the £ sign following the 60 & 29.

Regards
Gordon


"Max" wrote in message
...
"Gordon Baxter" wrote:
.. Is there anyway I can format the cells to
delete the £ sign which appears in some cells?


Try instead in B1, copied down:
=LEFT(SUBSTITUTE(TRIM(A1),"£",""),4)+0
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--






  #10   Report Post  
Gordon Baxter
 
Posts: n/a
Default Help formatting cells

Brilliant, that solves it.

Thanks for your help.

Gordon

"Max" wrote in message
...
Think we could put in B1, and copy down:
=LEFT(A1,SEARCH("£",A1)-1)+0
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Gordon Baxter" wrote in message
...
No that doesn't work Max. Perhaps I have not explained it very well.

The following are samples of figures I get: 410 £2, 60 £19, 700 £4, 29

£36.

After reducing these down to the first four digits I am left with: 410,

60
£, 700, 29 £.

I am looking to get rid of the £ sign following the 60 & 29.

Regards
Gordon







  #11   Report Post  
Max
 
Posts: n/a
Default Help formatting cells

You're welcome !
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Gordon Baxter" wrote in message
...
Brilliant, that solves it.

Thanks for your help.

Gordon



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
Conditional formatting...cont. from 9/25 Guenzak Excel Discussion (Misc queries) 4 September 26th 05 10:55 PM
Interrogating cells by cell formatting Bhupinder Rayat Excel Worksheet Functions 2 September 26th 05 11:32 AM
How do I link a cells formatting from one worksheet to another? ddepasquale Excel Worksheet Functions 0 July 26th 05 07:51 PM
Excel should allow more options for formatting cells rj123 Excel Worksheet Functions 0 July 23rd 05 03:45 AM
How to copy "edge" formatting to other cells. Sam Excel Discussion (Misc queries) 2 July 21st 05 01:23 PM


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