+ Reply to Thread
Results 1 to 3 of 3

Code to fill in blanks isn't working

  1. #1
    Forum Contributor
    Join Date
    09-05-2007
    Posts
    148

    Code to fill in blanks isn't working

    I use this code to fill in blanks in one of my workbooks.

    Please Login or Register  to view this content.

    It selectes data in one column based on the amount of rows in another and then just fills in the blank cells based on what's above.

    Unfortunately, it's not working in another sheet.

    I get a complie error: Expected function or variable and Selection on the 4th line is highlighted.


    Any ideas?

    Thanks

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Code to fill in blanks isn't working

    Hi thedon_1,

    By 4th line do you mean :-
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.FormulaR1C1 = "=R[-1]C"

    check if that sheet has blank cells (even not formulas which are resulting in blanks).. ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Code to fill in blanks isn't working

    do you have a variable or routine called Selection?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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