+ Reply to Thread
Results 1 to 2 of 2

Create Identifier for cell(s)

  1. #1
    Registered User
    Join Date
    05-20-2009
    Location
    Jonesboro, AR
    MS-Off Ver
    Excel 2007
    Posts
    6

    Create Identifier for cell(s)

    I'm working on the following macro:

    A row contains a drop-down list that, depending on the selection, adds or deletes rows below the current row. The initial row and the added rows comprise a single "entry," and there are multiple entries.

    My problem lies in that right now the VBA script I've written to perform this task has the first drop-down list's cell number hard-coded. This could be OK, except I need to apply the same functionality to the drop-down lists of all the entries, and since rows are being added and deleted constantly, their locations keep changing.

    I was wondering if there was a way to identify a cell (that's not unique) that I could check for, analogous to the "class" attribute in HTML.

    Or, is there another way to do what I'm wanting that I'm not thinking of.

    Thanks for your help,
    B.J.
    Last edited by bhardage; 05-21-2009 at 03:29 PM.

  2. #2
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Create Identifier for cell(s)

    Hi BJ,

    Afaik there is nothing similar to the "class" attribute. You could identify the cells by having a hidden comment attached to the relevant cells or using Insert Names..., or identify if all cells are in a single column or maybe static variable that holds the cell address after deletion etc...

    Can you please attach a sample workbook to provide more context which may help us provide another (more efficient) solution?
    (for me to help, please attach it as Excel 97-2003 compatible .xls format)


    Edit: Ooopps, after posting I realised this thread had been listed as "solved". BJ, can you please post your solution?
    This makes the forum more usable for people who search existing threads to find solutions to their own problems.

    Rob
    Last edited by broro183; 05-22-2009 at 09:45 PM.
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

+ 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