Results 1 to 9 of 9

Add formula next to every adjacent cell (except blanks)

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-25-2017
    Location
    Australia
    MS-Off Ver
    365
    Posts
    102

    Question Add formula next to every adjacent cell (except blanks)

    Doing this manually, I paste a Table-referencing formula into an empty cell next to a cell of data, then I double-click that little square box in the bottom corner to auto-fill all the way down.

    Problem is, there is the occasional blank, so I just skip down and paste the formula again, auto-fill, and repeat until the formula is next to all cells in the A1 column.

    I've tried using Record Macro to automate this, unfortunately it can't record "autofill next to ALL cells in the column", only to end at a specific point. ie. B1:B300

    I've actually found several google results asking a VBA question similar to this, but they're all how to autofill only down to the last row (with no skips), while I need the formula pasted into ALL cells in column B (but only if there's data in column A)

    I hope I'm explaining right. The result should be like this:

    Data =IFERROR(INDEX(Table1...
    Data =IFERROR(INDEX(Table1...
    Data =IFERROR(INDEX(Table1...
    ‎  ‎ 
    Data =IFERROR(INDEX(Table1...
    Data =IFERROR(INDEX(Table1...
    ‎  ‎ 
    Data =IFERROR(INDEX(Table1...

    The VBA macro is basically:

    1. Select cell B1
    2. Paste [Formula]
    3. Paste same [formula] next to any cell in column A that has data.
    Last edited by 2vbr; 09-28-2020 at 11:30 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 07-21-2015, 05:10 PM
  2. [SOLVED] Move cells adjacent to each other (delete blanks)
    By bbarth in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-10-2015, 11:18 AM
  3. [SOLVED] Counting blanks in non-adjacent cells
    By ClickingNoise in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-20-2013, 08:46 AM
  4. [SOLVED] Add formula if adjacent cell has name in it but remove formula in adjacent cell is blank
    By How How in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2013, 10:42 AM
  5. Replies: 1
    Last Post: 02-18-2013, 01:46 AM
  6. [SOLVED] Need Help !!! How to multiply 2 adjacent columns with blanks
    By chico.corrales in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-07-2012, 01:15 PM
  7. Removing cells based on adjacent blanks
    By F6Hawk in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-28-2007, 08:17 AM

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