+ Reply to Thread
Results 1 to 13 of 13

autofill until adjacent cell empty

  1. #1
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    autofill until adjacent cell empty

    Hello

    I m looking for a vba that fill Column B with copies of Adjacent cells form Column A, the copying should stop when Cell in Column A is empty

    Thanks

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: autofill until adjacent cell empty

    Try this..

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: autofill until adjacent cell empty

    use the attached file.

    Press CTRL+SHIFT+T for see your result

    If it was really helpful to you then dont forget to hit * button for user reputation.

    Regards
    CA Mahaveer Somani
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: autofill until adjacent cell empty

    Hi Sixthsence Thanks for your reply it works perfect ..I actaully have a vlookup fmrmula VLOOKUP(RC[-1],Sheet2!R[1]C[-1]:R[14]C,2,FALSE that i need to copy down range B1:B ,,,thought I could easily modify the code but I can`t..
    can you modify the code or do I need to creat a new thread ?

    Thanks

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: autofill until adjacent cell empty

    Vlookup formula in Column-A or for column-B alone you are applying vlookup via vba code? please clarify....

  6. #6
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: autofill until adjacent cell empty

    yeah via vba code in cell B1 based on cell A1 and array sheet2 A:B range ...

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: autofill until adjacent cell empty

    Since I don't have expertisation with R1C1 reference so I replaced your formula reference to xlA1 reference for my convenience.

    If you don't want to convert the formula cells as values then just remove this line from the below code rMyRng.Value = rMyRng.Value

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: autofill until adjacent cell empty

    it works!!...Thank you

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: autofill until adjacent cell empty

    Glad it helps you and thanks for the feedback

  10. #10
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: autofill until adjacent cell empty

    sorry one last question..how do I control on which sheet of the workbook the vba code works ?

  11. #11
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: autofill until adjacent cell empty

    HTML Code: 
    as i written sheet1.activate, you can control from there any sheet.

    if it was really helpful to you then dont forget to hit * button for user reputation.

    Regards
    CA Mahaveer Somani

  12. #12
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: autofill until adjacent cell empty

    Thank you..

  13. #13
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: autofill until adjacent cell empty

    nice to see you happy...

    have a great day.

    Regards
    CA Mahaveer somani

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Autofill cell underneath but only if adjacent cell in next column contains data
    By picton2000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2013, 07:36 AM
  2. [SOLVED] How to autofill any formula till last empty cell
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-16-2013, 08:56 AM
  3. [SOLVED] Autofill adjacent cell from pre-defined list
    By Seeded_Batch in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 03-23-2012, 06:25 AM
  4. Replies: 1
    Last Post: 02-06-2008, 08:23 AM
  5. Finding Adjacent empty cell
    By s1ip in forum Excel General
    Replies: 1
    Last Post: 07-14-2006, 03:55 PM

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