+ Reply to Thread
Results 1 to 5 of 5

Filling in the gaps

  1. #1
    Registered User
    Join Date
    01-06-2022
    Location
    UK
    MS-Off Ver
    365
    Posts
    3

    Filling in the gaps

    Hello , I hope this makes sense, I have tried IF statements in VBa with no joy , maybe someone here knows better.

    I need a small efficient bit of VBa, that will drag / fill the empty rows below it until it the next value, and then the same occurs. (column A)

    There should be a cut of point maybe of say 9000 rows , so it doesn't go on forever.

    Kind Regards

    Capture.JPG
    Attached Files Attached Files
    Last edited by Fenge; 11-30-2022 at 07:14 AM.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: Filling in the gaps

    a workbook is easier to manipulate than a picture - please see big yellow banner - upload workbook - help us to help you.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Filling in the gaps

    Try such code:

    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Filling in the gaps

    BTW: if you can accept also other than macro solutions, like:
    1) as you are using excel 365, and if your real data contain also headers (probably there are some) you can use power query (det and transform data) and fill-down emplty values
    2) a standard "quick-manual") solution could be to mark the whole column with empty cells, use "Go-to" (Ctrl+G) and in dialog Special -> Empty cells. Note address of first empty cell. Say it's A15. In formula bar write a formula referring to cell above, so =A14 and commit it not by enter but by Ctrl+Enter. Now select again whole column, copy it and paste special as values (in the same place). Longer to write than to do.

  5. #5
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Filling in the gaps

    Hi, Fenge. Try the following macro:

    Please Login or Register  to view this content.
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

+ 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] Filling in gaps in rows by deducing relationships across table
    By Marbleking in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-13-2020, 05:14 AM
  2. Filling daily data in gaps
    By Jules1995 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-10-2019, 08:32 PM
  3. Insert rows, filling in number gaps
    By mmillertech in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-14-2018, 01:31 PM
  4. [SOLVED] Need Code for Filling gaps in Cells
    By pvsvprasad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2016, 04:30 AM
  5. using text data from one table and filling in the gaps in another.
    By X-tremejoe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-05-2012, 08:43 AM
  6. Filling in data gaps
    By hoffey in forum Excel General
    Replies: 2
    Last Post: 02-24-2010, 08:07 PM
  7. Filling gaps in non adjacent column
    By Robert Jules in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-01-2005, 11:45 AM

Tags for this Thread

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