Macros in excel 2000
I have a macro which i need to use on different spreadsheets where the data
is of various lengths. I need to get the macro to go to one cell below the last active cell in a column. I have made the macro work for the first sheet where there are 1101 rows. This is what the part of the macro looks like, i need the cell values replaced with the code to go to the last active cell in row I and J and then move down one- Range("I1102").Value = "Over Two Days" Range("I1103").Value = "Under Two Days" Range("J1102").FormulaR1C1 = "=COUNTIF(R[-" & iLastRow - 1 & _ "C:R[-1]C,""3"")" Range("J1103").FormulaR1C1 = "=COUNTIF(R[-" & iLastRow - 1 & _ "C:R[-2]C,""<=3"")" Look forward to the replies. My thanks in advance Jody Williams |
Range("A65536").End(xlUp).Offset(1, 0).Select
"traineeross" wrote: I have a macro which i need to use on different spreadsheets where the data is of various lengths. I need to get the macro to go to one cell below the last active cell in a column. I have made the macro work for the first sheet where there are 1101 rows. This is what the part of the macro looks like, i need the cell values replaced with the code to go to the last active cell in row I and J and then move down one- Range("I1102").Value = "Over Two Days" Range("I1103").Value = "Under Two Days" Range("J1102").FormulaR1C1 = "=COUNTIF(R[-" & iLastRow - 1 & _ "C:R[-1]C,""3"")" Range("J1103").FormulaR1C1 = "=COUNTIF(R[-" & iLastRow - 1 & _ "C:R[-2]C,""<=3"")" Look forward to the replies. My thanks in advance Jody Williams |
I showed you that previously
iLastRow = Cells(Rows.Count, "F").End(xlUp).Row or any other column -- HTH RP (remove nothere from the email address if mailing direct) "traineeross" wrote in message ... I have a macro which i need to use on different spreadsheets where the data is of various lengths. I need to get the macro to go to one cell below the last active cell in a column. I have made the macro work for the first sheet where there are 1101 rows. This is what the part of the macro looks like, i need the cell values replaced with the code to go to the last active cell in row I and J and then move down one- Range("I1102").Value = "Over Two Days" Range("I1103").Value = "Under Two Days" Range("J1102").FormulaR1C1 = "=COUNTIF(R[-" & iLastRow - 1 & _ "C:R[-1]C,""3"")" Range("J1103").FormulaR1C1 = "=COUNTIF(R[-" & iLastRow - 1 & _ "C:R[-2]C,""<=3"")" Look forward to the replies. My thanks in advance Jody Williams |
All times are GMT +1. The time now is 03:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com