+ Reply to Thread
Results 1 to 3 of 3

Selecting a column range based on a value in header row

  1. #1
    Registered User
    Join Date
    01-04-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Selecting a column range based on a value in header row

    I have sheets named Wk1, Wk2, Wk3 etc and a Summary sheet.
    The Summary sheet has the week numbers going across the sheet in row 3
    Below this is a series of calculations (KPIs) performed for each week. However the data used in these formulas comes from a number of different sheets therefore week to week the data could be changed in error for prior weeks and this is my problem.

    What I would like to do is have a macro button on the weekly sheets that takes the week number of that sheet (from a cell or from the tab name), looks for that week number along row 3 of the Summary tab. Then copies and pastes as values the calculations below it for instance week 1 would copy and paste values in column B range B4:B6, or week 3 would use D4:D6.

    Please bare in mind I am fairly new to VBA.

    Thanks

    Ad.
    Last edited by Ad83; 01-05-2012 at 05:31 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,669

    Re: Selecting a column range based on a value in header row

    It would be easier to picture your requirement with a sample of the workbook.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-04-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Selecting a column range based on a value in header row

    Hi , I have now attached a very cut down example file. As couldnt upload from work.
    So hopefully will make sense what Im trying to do?!

    Cheers,
    Adam.
    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)

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