Excel Macro Needs Help Fast

Closed
MaxPi - Aug 9, 2011 at 04:57 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Aug 9, 2011 at 07:35 PM
Hello,

I'm currently trying to introduce macros in my reports at work. Everything works fine but there's one thing that I just CAN'T find an answer to. Actually, I'm using the OFFSET function to copy/paste formulas to a specific column (let's say column C) but the problem is that if, someday, someone has to add a column in the sheet. My column C might become column D and the macro won't work.. how can I "Name" that C Column (let's say I name it "Base") so that it will always offset to the column named "Base"?

Any help will be greatly appreciated!

Thx

Max

Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Aug 9, 2011 at 07:35 PM
you kind of answered your own question. You need to first find the location of that column. Then you can adjust your columns. Other thing you can try is name the whole column a range. In that case if some one insert a column, your named range would move. The best option IMHO is to find where is the column rather than relying on named range.
0