+ Reply to Thread
Results 1 to 3 of 3

First timer: Getting my macro to run for a matrix of cells based on row & column values

  1. #1
    Registered User
    Join Date
    12-27-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question First timer: Getting my macro to run for a matrix of cells based on row & column values

    Hi,

    Thanks for this forum, thanks for reading this.

    I'm newly entering the world of macro's just by googling and intuition, but I'm stuck.

    So, in my worksheet I have a matrix which I would like to use to hide or show groups of rows. Each row (general, electricity etc) should specify which group of rows to hide. The column should specify in which tab this should happen.

    I have given the groups of to-be-hidden rows intuitive names (general, electricity etc). Getting the rows to hide based on the cell value works with:

    Please Login or Register  to view this content.
    Where 'General' in this case is a string defined as "1:7".

    I could repeat this for every cell in the matrix, but I feel this isn't necessarily the most efficient thing to do. The sheetname in which rows should be hidden is specified in the first row of the matrix (of the current sheet). Which rows are to be hidden is specified in the first column of the matrix.

    Could anyone help me writing what I believe is called a procedure, such that above code works for the whole matrix based on the column and row values?

    Attached a screenshot of the matrix and the relevant code.
    Screen Shot 2013-12-27 at 16.50.56.jpg
    Last edited by ar3nd; 12-27-2013 at 01:12 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: First timer: Getting my macro to run for a matrix of cells based on row & column value

    Hello ar3nd,

    Welcome to the Forum!

    There seems to a problem with your attachment. Possibly there was an error during the upload.
    1. Edit you post and clickt "Go Advanced" button in the bottom right corner of your post.
    2. Click "Manage Attachments" button to open the attachment manager.
    3. You can then remove you attachment and upload it again.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-27-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: First timer: Getting my macro to run for a matrix of cells based on row & column value

    Thanks Leith, I think I managed.

+ 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: 1
    Last Post: 12-12-2012, 08:46 PM
  2. [SOLVED] Macro to color groups of cells based on column values
    By juskojj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2012, 10:53 AM
  3. Replies: 23
    Last Post: 09-25-2009, 07:39 PM
  4. populate cells in a matrix from goal seek values based on
    By W2009 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-08-2009, 02:12 AM
  5. Summing matrix values based on X & Y axis values
    By vtbigmac in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2009, 01:29 PM

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