Excel/Referencing Named Cells In VBA
QUESTION: Hi Tom,
This question is in regards to the post you answered a couple of days ago about setting up the code so that if we were to sort e.g. A1:A50 and a set A1:A5 was moved around, the function would still only work within that defined group.
You had mention named ranges would not work like described above. But what if we assigned each cell a name and referenced it in VBA. Would that work?
How do you reference a named cell with the code you provided in VBA?
I tested that Idea.
I named 25 cells with individual names, then sorted them. The names still referred to the original cell location and was unrelated to the value displayed there in.
If you had some type of value in an adjacent column that would identify the cells and you sorted that column along with the original values so they remained in the same row with each other although which row changes based on the sort, then you could use that column to determine which cells to work with.
---------- FOLLOW-UP ----------
QUESTION: So, essentially after having sorted by an adjacent column while keeping the Enabled/Paused values in the same row as the original cells in adjacent column, change the range values in the code (list individually in non contiguous range)to work with that specific sort.
If this is not what you mean, can you forward an example spreadsheet?
Thank you much!
I don't have your email. The only thing I know about you is the word "Derek"
If you want to send a dummy file indicating which column identifies a group and which column will be changed to Enabled/Paused based on an entry of "????" (refresh my memory on what the key word is - was it Enabled?) in the trigger cell.
send to firstname.lastname@example.org
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here