+ Reply to Thread
Results 1 to 5 of 5

Insert column and fill column upto where data is in previous column

  1. #1
    Registered User
    Join Date
    11-21-2012
    Location
    U
    MS-Off Ver
    Excel 2003
    Posts
    23

    Insert column and fill column upto where data is in previous column

    sorry duplicated by mistake
    Last edited by aka189; 11-23-2012 at 08:00 PM.

  2. #2
    Forum Contributor
    Join Date
    03-21-2012
    Location
    Ho Chi Minh city
    MS-Off Ver
    Excel 2003
    Posts
    180

    Re: Insert column and fill column upto where data is in previous column

    PHP Code: 
    Option Explicit
    Sub Aka189
    ()
     
    Dim Rws As LongRng As Range
     
     Rws 
    = [A65500].End(xlUp).Row
     Set Rng 
    Range(Cells(Rws"A"), Cells(Rws"A").End(xlUp))
     
    MsgBox Rng.Address         '<=|'
     
    Columns("B:B").Select
     Selection
    .Insert Shift:=xlToRight
     Rng
    .Offset(, 1).Value "Jan"
     
    End Sub 

  3. #3
    Registered User
    Join Date
    11-21-2012
    Location
    U
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Insert column and fill column upto where data is in previous column

    Quote Originally Posted by Sa DQ View Post
    PHP Code: 
    Option Explicit
    Sub Aka189
    ()
     
    Dim Rws As LongRng As Range
     
     Rws 
    = [A65500].End(xlUp).Row
     Set Rng 
    Range(Cells(Rws"A"), Cells(Rws"A").End(xlUp))
     
    MsgBox Rng.Address         '<=|'
     
    Columns("B:B").Select
     Selection
    .Insert Shift:=xlToRight
     Rng
    .Offset(, 1).Value "Jan"
     
    End Sub 
    Thanks very much Sa DQ

  4. #4
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    879

    Re: Insert column and fill column upto where data is in previous column

    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  5. #5
    Registered User
    Join Date
    11-21-2012
    Location
    U
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Insert column and fill column upto where data is in previous column

    Quote Originally Posted by WasWodge View Post
    Sorry about this will do from next time

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1