+ Reply to Thread
Results 1 to 2 of 2

Identifying a range based on a cell at the bottom of the range with unique contents?

  1. #1
    Registered User
    Join Date
    03-22-2017
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    8

    Identifying a range based on a cell at the bottom of the range with unique contents?

    I need to apply some formatting and dragging down of formulas using a Macro (I have lots of these) on a number of spreadsheets. Unfortunately the range that I need to do this varies from spreadsheet to spreadsheet in terms of the number of rows.

    At the bottom of the rows that I need to apply the changes to is a number of cells that have unique information that could be used for reference. What I would like to be able to do is use a macro that looks for some specific cell content to identify the cell – then use that cells coordinates to then determine the row number that the formatting and formula needs to be dragged down to.

    I’m pretty new to VBA and this has really stumped me and I’ve had no success from using google searches and trawling support sites.

    This is kind of what I’m trying to do…

    From the active cell – select a range (of adjacent cells)
    Identify the bottom row that the changes need to be made to by using the identifier cell beneath it.
    Drag down the range of selected cells to the bottom row identified above.

    I hope this makes some kind of sense and any help would be really appreciated.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Identifying a range based on a cell at the bottom of the range with unique contents?

    Code like this should work - assumes the identifier cell has the word Total in it, and that you want to match the column to the left....

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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: 07-04-2014, 11:52 AM
  2. [SOLVED] need help re hiding rows in a range based on cell contents
    By jimredfield in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-30-2012, 06:53 PM
  3. VBA copying a range based on contents of a cell
    By soso123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-25-2011, 02:12 PM
  4. Specify range based on cell contents?
    By hgeek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2010, 01:34 PM
  5. Replies: 6
    Last Post: 03-31-2009, 11:17 AM
  6. [SOLVED] Reference Data Range based on cell contents
    By PCLIVE in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-27-2006, 11:10 AM
  7. [SOLVED] Can I select a range based on the cell's contents?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2005, 07:05 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