Macro to Add Columns in Excel

Closed
MC - Oct 13, 2009 at 07:43 AM
 aby - Jul 10, 2012 at 04:51 AM
Hello,
I have a spreadsheet to track patient information. It has the potential to grow out to the right based on number of contacts made. I need to write a macro to insert 3 columns after the last column with data in it. Now- I can do that and I have done that. HOWEVER- It always inserts the columns in the exact same cell address. It's not going to the column immediately to the right of the last column with data in it. I need to give people the option to insert multiple columns for multiple records as needed. But the way I have the macro running right now, no matter how many times I run it- it inserts the columns in the same spot and would overwrite anything that was in there. I tried hitting the Ctrl and right arrow to get to the cell after the last bit of data and it still doesn't help. Any ideas?! Is it possible?

5 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Oct 13, 2009 at 08:53 PM
I am little confused this morning. After the last columns the empty columns are available. why insert?? if it is somewhere in the middle I can understand.
4
please enlight me on this matter with thanks.
0