+ Reply to Thread
Results 1 to 4 of 4

How vba macro can get reference from cell

  1. #1
    Registered User
    Join Date
    09-02-2010
    Location
    T. Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Lightbulb How vba macro can get reference from cell

    Hey there guys !
    I am a beginner in excel, but i am really curious, so I am learning and trying things as i need...
    Here is my question:

    I am developing this project where i have the hours of my workers throughout the whole year. The tables are splitted in weeks, so I have 50+ tables.
    I created this macro that selects all the areas I want to clear, but if I want to clear data from the next table, I have to make another macro just for the next table ... and so on and so on ...

    Here is the macro :

    Sub DeleteValues()
    '
    ' DeleteValues Macro
    '

    '
    ActiveWindow.SmallScroll Down:=12
    Range("D47:R61").Select
    ActiveWindow.SmallScroll Down:=12
    Range("D47:R61,E69:F74,Y47:AL61").Select
    Range("Y47").Activate
    Selection.ClearContents
    End Sub


    Lets say for the range If I have something like "Range ("=B23") and on the cell B23 I will show a value like: "D47:R61,E69:F74 ..."

    So on the B23 I would actually have a list of all the ranges values I would like to select and then i would run the macro ...

    Does that make any sense ?
    Do u guys have any other alternative ?!

    Thank you very much in advance ,

    Thiago Neves

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: How vba macro can get reference from cell

    please attach an example workbook...
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    09-02-2010
    Location
    T. Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: How vba macro can get reference from cell

    Here is the start of the project, it still a little messy though ...
    Thanks
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-02-2010
    Location
    T. Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: How vba macro can get reference from cell

    Really nobody could give me a heads up ?!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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