Search : in
By :

Macro to Add Columns in Excel

Last answer on Oct 14, 2009 1:53:18 am BST MC, on Oct 13, 2009 12:43:10 pm BST 
 Report this message to moderators

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?

Configuration: Windows XP Internet Explorer 6.0

Best answers for « Macro to Add Columns in Excel » in :
Basic Excel Formulas ShowBasic Excel Formulas Below are some basic formulas for Microsoft excel: Basic formula : ADDITION cell A1 to A10 = sum (A1: A10) AVERAGE cell A1 to A10 = average (A1: A10) MAXIMUM cell A1 to A10 = max (A1: A10) MINIMUM...
Avoid duplicates in Excel ShowAvoid duplicates in Excel In order to avoid duplication when encoding in a column from an excel sheet: take the conditional format on the first cell under the headings (eg A2) choose the following formula:...
Excel – Comparing cell A1 to entire A column in Sheet 2 ShowExcel – Comparing cell A1 to entire A column in Sheet 2 Issue Solution Note Issue I have been trying to compare sheet1 A2 to sheet2 A2 through A500 and if it exists somewhere in sheet2's a col then copy that entire row to a new sheet....
Download Microcharts ShowWhen making an important decision, it is important to see and analyze in details the different data. By simply adding Microcharts, Microsoft Excel can provide you a complete analysis of your current situation. Microcharts is an add-in for...
Download Email Address Extractor ShowEmail Address Extractor allows to extract automatically all the e-mail addresses from Outlook Express or other application. Then, you can import the results into your Windows address book, Excel, Word or other application. The extracted e-mail...
Worksheet - Cells ShowThe Concept of a Cell A "cell" is the intersection between a line (horizontal) and a column (vertical) on a worksheet. Thus, the name of the line combined with the name of the column gives the cell's coordinates (the term address is sometimes also...

1

 venkat1926, on Oct 14, 2009 1:53:18 am BST
  • +2

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.

Reply to venkat1926