#1   Report Post  
Jo
 
Posts: n/a
Default cell info

If I have "123456789" in a cell I wish to copy specifc parts of it to other
cells
i.e.
A1 first 3 - 123
A2 second 3 - 456
A3 third 3 - 789
How can I do this both in a worksheet and using VBA.
Thanks
Jo
  #2   Report Post  
kraljb
 
Posts: n/a
Default


In a work sheet

=left($A$1,3) (123)
=mid($A$1,4,3) (456)
=right($A$1,3) (789)

VBA is the same layout, just minus the "="

Left( Range( "A1" ).Value , 3)
Mid( Range( "A1" ).Value , 4 , 3)
Right( Range( "A1" ).Value , 3)


--
kraljb
------------------------------------------------------------------------
kraljb's Profile: http://www.excelforum.com/member.php...fo&userid=9955
View this thread: http://www.excelforum.com/showthread...hreadid=276435

  #3   Report Post  
LanceB
 
Posts: n/a
Default

Assuming "123456789" in b1
=left(b1,3) in a1
=mid(b1,4,3) in a2
=right(b1,3) in a3

Lance

"Jo" wrote:

If I have "123456789" in a cell I wish to copy specifc parts of it to other
cells
i.e.
A1 first 3 - 123
A2 second 3 - 456
A3 third 3 - 789
How can I do this both in a worksheet and using VBA.
Thanks
Jo

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
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
Unable to set the active cell from VBA HMS New Users to Excel 1 December 7th 04 09:56 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


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