I am trying to make maros in excel, and I scarcely a detail that bothers me. I have a table with for example 4 columns entitled "Album Title", "Guest Artist", "Duration". Today my macro is different queries on this table, but I question my cell every time the position line / column of the cell (eg Cell (2,1)) if I want to retrieve the title of first album in list. Where this problem is that you can well imagine in this table add column "Year", for instance, by inserting between the artist and length, and my cell is being shifted, nothing works ...
| Album Title | Artist Name | Duration |
| Album 1 | Artist 1 | Length 1 |
| Album 2 | Artist 2 | Length 2 |
Could become the latest:
| Album Title | Artist Name | Year | Time |
| Album 1 | Artist 1 | Year 1 | Length 1 |
| Album 2 | Artist 2 | Year 2 | Length 2 |
To my macro is a minimum perennial and survive any revision of this table, I want to know if there is a method that would make my macro independent additions / deletions of columns. I thought to do a search every time the title of the column and recovered and the number of the column in question to continue my search.
Is there another solution? Or is it the only way to proceed?
Bookmarks