N Naas Jul 29, 2004 #1 How do I get Excel to automatically change/update macros after I've added rows and/or columns in a spreadsheet
How do I get Excel to automatically change/update macros after I've added rows and/or columns in a spreadsheet
B Bob Phillips Jul 29, 2004 #3 You don't, you cater for the variable length to begin with. For example, this code cRows = Cells(Rows.Count,"A").End(xlUp).Row will return the number of rows that are used in column A, regardless of whether new ones have just been added. If you want more help, post back with more details of what you want to do. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct)
You don't, you cater for the variable length to begin with. For example, this code cRows = Cells(Rows.Count,"A").End(xlUp).Row will return the number of rows that are used in column A, regardless of whether new ones have just been added. If you want more help, post back with more details of what you want to do. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct)
J Jim May Jul 29, 2004 #4 will return the number of rows that are used in column A Bob, I would have defined (to the OP) cRows as returning the last non-empty row number in Column A. Am I being persnickety? <<vbg>> Jim
will return the number of rows that are used in column A Bob, I would have defined (to the OP) cRows as returning the last non-empty row number in Column A. Am I being persnickety? <<vbg>> Jim
G Guest Jul 29, 2004 #5 Hi Ron, This is one. Hopes it is enough. Regards, Naas Sub adddelivery() ' ' adddelivery Macro ' Macro recorded 2003/04/30 by Naas Vermaak ' ' ActiveSheet.Unprotect Sheets("FIXED INPUTS").Select Range("A49:J49").Select Selection.Copy Sheets("DELIVERIES").Select Range("B27").Select Selection.insert Shift:=xlDown Range("B46:K46").Select Selection.Delete Shift:=xlUp Range("C27").Select End Sub -----Original Message----- Hi Naas Post a example of your macro. We can help you then -- Regards Ron de Bruin http://www.rondebruin.nl "Naas" <[email protected]> wrote in Click to expand... message news:[email protected]...
Hi Ron, This is one. Hopes it is enough. Regards, Naas Sub adddelivery() ' ' adddelivery Macro ' Macro recorded 2003/04/30 by Naas Vermaak ' ' ActiveSheet.Unprotect Sheets("FIXED INPUTS").Select Range("A49:J49").Select Selection.Copy Sheets("DELIVERIES").Select Range("B27").Select Selection.insert Shift:=xlDown Range("B46:K46").Select Selection.Delete Shift:=xlUp Range("C27").Select End Sub -----Original Message----- Hi Naas Post a example of your macro. We can help you then -- Regards Ron de Bruin http://www.rondebruin.nl "Naas" <[email protected]> wrote in Click to expand... message news:[email protected]...
B Bob Phillips Jul 29, 2004 #6 Jim, No, you are being accurate. The number can be derived from it, but per se it is not that number. Thanks!
Jim, No, you are being accurate. The number can be derived from it, but per se it is not that number. Thanks!