+ Reply to Thread
Results 1 to 4 of 4

Macro that fills entire table row based on first row value and another cell

  1. #1
    Registered User
    Join Date
    10-09-2014
    Location
    Lisbon, Portugal
    MS-Off Ver
    2007
    Posts
    2

    Macro that fills entire table row based on first row value and another cell

    Hi all

    Whoever solves me this, saves my life:D

    I think it's a simple macro, but i just can't find the right way to do it.
    All i got is a simple macro that fills the row, but since the table is supposed to have 365 columns, i need something that loops or so. (I hate the fact that my background isn't programming, for i think i would do this in a sec).

    I want to make a table row fill with "P" depending on the first row value and the cell above the table.
    (easier when looking at the example)

    help macro.png

    I'll attach the file aswell

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Macro that fills entire table row based on first row value and another cell

    You do not need a macro to do this. A formula will work. In Cell J13 enter: =IF(VALUE(RIGHT(J$11,1))=$I13,"P",""). You can then copy this formula to all the cells in your table.

  3. #3
    Registered User
    Join Date
    10-09-2014
    Location
    Lisbon, Portugal
    MS-Off Ver
    2007
    Posts
    2

    Re: Macro that fills entire table row based on first row value and another cell

    Thank you for the help!

    Thats somewhat the solution i currently have.
    Problem is, i got 365*150 cells with the formula, making it kinda heavy and sometimes excel crashes

    my bad here, i didnt upload the file i have with the formula i have - will do.
    as a last resort, maybe my formula can be smaller, making the file lighter.

    Thanks again!
    Attached Files Attached Files

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Macro that fills entire table row based on first row value and another cell

    I've extended the table to 365*500 rows and it's still responsive.

    If anything, a macro would probably be slower.

+ 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. Replies: 2
    Last Post: 10-13-2015, 05:05 PM
  2. Replies: 6
    Last Post: 06-17-2014, 11:11 AM
  3. I need a formula that fills one cell based upon a choice made in another cell
    By rayrudolph in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-29-2013, 06:35 PM
  4. [SOLVED] Macro to Move Entire Row Based on Cell Contents
    By alpha608 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-27-2012, 01:58 PM
  5. Macro to delete entire row based on cell contents
    By ATX in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-06-2011, 03:52 AM
  6. MACRO Transfer entire row based on a table in a third sheet/tab
    By eastydie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2011, 04:48 AM
  7. Combo box that fills out an entire sheet?
    By charliemopps in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-06-2009, 02:47 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