+ Reply to Thread
Results 1 to 5 of 5

Autofilling buttons in cells, if a row is NOT empty

  1. #1
    Registered User
    Join Date
    02-21-2023
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    3

    Question Autofilling buttons in cells, if a row is NOT empty

    Hello, I am working on a document for work and have a basic understanding of Excel, but have no experience with VBA, though I feel like that is what i would need in order to do the following.

    Risk Doc TEST.xlsx

    In my workbook, I have a second sheet that takes data from the first sheet and auto-populates for the first few columns using IF(ISBLANK) statements. I am looking to do something similar but with the stuff from Form Control. Basically, if any a cell in columns B, C, or D of that row is NOT blank, then I would like Check Boxes from E7:J7 copied into the relative row E:J. Is this possible? And if so, how would I go about doing this?

    Thank you in advance!

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2016
    Posts
    897

    Re: Autofilling buttons in cells, if a row is NOT empty

    Hi there,

    I have added some VBA code to your file. Click the button to populate the shapes.
    This will:
    - Copy the shapes (tick-boxes & comment box) in row 7. This also copies the tick box selection. We could move the default shapes onto another (hidden) sheet if preferred. Code would need to be updated.
    - Check every following row for columns B, C or D not being empty.
    - If not empty, we check if there are already any shapes in the row (preventing to overwrite previous check boxes..).
    - If values found and no shapes in that row, the shapes from row 7 are copied into that row.

    I have deleted some of your formulas for testing to ensure it works if only one or 2 of the 3 columns contain a value. Just pull down the formulas from row 7 to fill the blanks.
    I have also left some tick boxes in some cells to test for them not being overwritten.

    Note, the shapes have specific names. If they are different in the actual file, this will need to be updated.

    Hope this helps.



    Please Login or Register  to view this content.
    Attached Files Attached Files
    If your Question is answered; please mark it SOLVED. If you are happy with a member's solution, say 'Thanks' and click the 'Star' to Add Reputation.

  3. #3
    Registered User
    Join Date
    02-21-2023
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    3

    Re: Autofilling buttons in cells, if a row is NOT empty

    Amazing! Thank you so much, this works great! I really appreciate your help.

  4. #4
    Registered User
    Join Date
    02-21-2023
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    3

    Re: Autofilling buttons in cells, if a row is NOT empty

    I wanted to ask a follow up question.

    I have fiddled with the document somewhat and for some reason certain rows are being missed. Could someone help me figure out why this is happening?
    Risk Management Doc - finding a fix.xlsm

    Thank you!

  5. #5
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2016
    Posts
    897

    Re: Autofilling buttons in cells, if a row is NOT empty

    Hi again,

    You need to make sure each shape (group of check-boxes) is completely inside their row.
    When they overlap, the macro will think there are already shapes in that row if part of the shape above or below is in that row.
    I have adjusted them for you in the attached file.
    You could also consider making the rows a bit higher to give the shapes a bit more room.

    Cheers.
    Attached Files Attached Files

+ 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] Autofilling cells by calling in cells on another sheet
    By sjb72 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-09-2020, 05:39 AM
  2. Autofilling Cells using VLOOKUP
    By canuckshockey in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-14-2014, 12:51 PM
  3. Radio buttons not autofilling properly
    By mrsnid in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2013, 09:03 AM
  4. Help with autofilling cells
    By shutchinson in forum Excel General
    Replies: 1
    Last Post: 04-23-2011, 05:51 AM
  5. Autofilling cells based on adjacent cells/history
    By Syzygy29 in forum Excel General
    Replies: 0
    Last Post: 06-15-2010, 03:49 PM
  6. Autofilling next empty cell in column?
    By Bruce in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-20-2006, 11:55 PM
  7. [SOLVED] autofilling cells
    By Tim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-04-2005, 08:06 PM

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