Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default cut and paste 5 numbers from one col to another for entire column

I'm trying to figure out how, in Excel, I'd cut the first five digits off the
numbers that appear in each cell of one column and then append those numbers
to the corresponding cells in another column.

Would that be a query of some sort, or done with vba? I'm more experienced
with Access than Excel.

Thanks in advance,
CW
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default cut and paste 5 numbers from one col to another for entire column

Very simple in VBA:

Sub appnd()
For i = 1 To 5
Cells(i, "B").Value = Cells(i, "B").Value & Left(Cells(i, "A").Value, 5)
Next
End Sub

--
Gary's Student


"Cheese_whiz" wrote:

I'm trying to figure out how, in Excel, I'd cut the first five digits off the
numbers that appear in each cell of one column and then append those numbers
to the corresponding cells in another column.

Would that be a query of some sort, or done with vba? I'm more experienced
with Access than Excel.

Thanks in advance,
CW

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default cut and paste 5 numbers from one col to another for entire col

Thanks GS,

I just put that code in the vba editor and ran it. It worked except it only
worked on five cells and then stopped. I need it to work on all cells in the
column

Also, any easy way to delete those first 5 numbers from the original column
they were in (A)?

Thanks a ton!
CW

"Gary''s Student" wrote:

Very simple in VBA:

Sub appnd()
For i = 1 To 5
Cells(i, "B").Value = Cells(i, "B").Value & Left(Cells(i, "A").Value, 5)
Next
End Sub

--
Gary's Student


"Cheese_whiz" wrote:

I'm trying to figure out how, in Excel, I'd cut the first five digits off the
numbers that appear in each cell of one column and then append those numbers
to the corresponding cells in another column.

Would that be a query of some sort, or done with vba? I'm more experienced
with Access than Excel.

Thanks in advance,
CW

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default cut and paste 5 numbers from one col to another for entire col

Ok, I'm dumb.

I can change the upper value for I to get any number of columns....

CW

"Cheese_whiz" wrote:

Thanks GS,

I just put that code in the vba editor and ran it. It worked except it only
worked on five cells and then stopped. I need it to work on all cells in the
column

Also, any easy way to delete those first 5 numbers from the original column
they were in (A)?

Thanks a ton!
CW

"Gary''s Student" wrote:

Very simple in VBA:

Sub appnd()
For i = 1 To 5
Cells(i, "B").Value = Cells(i, "B").Value & Left(Cells(i, "A").Value, 5)
Next
End Sub

--
Gary's Student


"Cheese_whiz" wrote:

I'm trying to figure out how, in Excel, I'd cut the first five digits off the
numbers that appear in each cell of one column and then append those numbers
to the corresponding cells in another column.

Would that be a query of some sort, or done with vba? I'm more experienced
with Access than Excel.

Thanks in advance,
CW

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default cut and paste 5 numbers from one col to another for entire col

You are not dumb at all !

Commend yourself for taking the initiatve and coming up with the
modification on your own.

Have a pleasant weekend
--
Gary's Student


"Cheese_whiz" wrote:

Ok, I'm dumb.

I can change the upper value for I to get any number of columns....

CW

"Cheese_whiz" wrote:

Thanks GS,

I just put that code in the vba editor and ran it. It worked except it only
worked on five cells and then stopped. I need it to work on all cells in the
column

Also, any easy way to delete those first 5 numbers from the original column
they were in (A)?

Thanks a ton!
CW

"Gary''s Student" wrote:

Very simple in VBA:

Sub appnd()
For i = 1 To 5
Cells(i, "B").Value = Cells(i, "B").Value & Left(Cells(i, "A").Value, 5)
Next
End Sub

--
Gary's Student


"Cheese_whiz" wrote:

I'm trying to figure out how, in Excel, I'd cut the first five digits off the
numbers that appear in each cell of one column and then append those numbers
to the corresponding cells in another column.

Would that be a query of some sort, or done with vba? I'm more experienced
with Access than Excel.

Thanks in advance,
CW



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default cut and paste 5 numbers from one col to another for entire col

Thanks again!

I got it to delete the five off the original column too. All set thanks to
your help!

CW

"Gary''s Student" wrote:

You are not dumb at all !

Commend yourself for taking the initiatve and coming up with the
modification on your own.

Have a pleasant weekend
--
Gary's Student


"Cheese_whiz" wrote:

Ok, I'm dumb.

I can change the upper value for I to get any number of columns....

CW

"Cheese_whiz" wrote:

Thanks GS,

I just put that code in the vba editor and ran it. It worked except it only
worked on five cells and then stopped. I need it to work on all cells in the
column

Also, any easy way to delete those first 5 numbers from the original column
they were in (A)?

Thanks a ton!
CW

"Gary''s Student" wrote:

Very simple in VBA:

Sub appnd()
For i = 1 To 5
Cells(i, "B").Value = Cells(i, "B").Value & Left(Cells(i, "A").Value, 5)
Next
End Sub

--
Gary's Student


"Cheese_whiz" wrote:

I'm trying to figure out how, in Excel, I'd cut the first five digits off the
numbers that appear in each cell of one column and then append those numbers
to the corresponding cells in another column.

Would that be a query of some sort, or done with vba? I'm more experienced
with Access than Excel.

Thanks in advance,
CW

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
How do I ROUNDUP an entire column of numbers? Yellow Elk Excel Discussion (Misc queries) 3 December 24th 07 01:09 PM
Cut and Paste entire row from one worksheet to another [email protected] Excel Worksheet Functions 5 October 17th 06 05:40 AM
Cut and Paste entire row from one worksheet to another [email protected] Excel Worksheet Functions 0 October 13th 06 05:46 PM
how to apply one function to an entire column of numbers guatdoc Excel Worksheet Functions 1 November 9th 05 04:26 AM
How to add the same value to an entire column of numbers?? Brita Excel Worksheet Functions 1 December 29th 04 03:53 AM


All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"