![]() |
raltive cell ref conundrum
Hi,
I have a spreadsheet with 30 records in it. I would like a macro that enables me to delete a record and then move all the others up. The complicated part is that I do not want it to copy any cells below the 30 records. (I have other data here) As an example if I am in record 1 (e.g. A1) and choose to delete it, the macro moves (copies) cells A2:A30. If I am in record 2 and choose to delete it, the macro moves (copies) cells A3:A30. As you can see I need to use relative addressing for one part of the range(A3) but not the lower limit (A30). Is this possible? If so how? thanks Lewis Brunton |
raltive should be relative
Sorry
"Lewis Brunton" wrote: Hi, I have a spreadsheet with 30 records in it. I would like a macro that enables me to delete a record and then move all the others up. The complicated part is that I do not want it to copy any cells below the 30 records. (I have other data here) As an example if I am in record 1 (e.g. A1) and choose to delete it, the macro moves (copies) cells A2:A30. If I am in record 2 and choose to delete it, the macro moves (copies) cells A3:A30. As you can see I need to use relative addressing for one part of the range(A3) but not the lower limit (A30). Is this possible? If so how? thanks Lewis Brunton |
raltive should be relative
Excel's built-in Data Form will do exactly that. Read help on it. Basically,
to use the Form the records needs a header in the cell above the first record. Select (highlight) the header and all the records and name that range "Database". Whenever you select any cell in that range and from the menubar select Data/Form, the form will pop up allowing you to modify your records without moving anything below the records. Mike F "Lewis Brunton" wrote in message ... Sorry "Lewis Brunton" wrote: Hi, I have a spreadsheet with 30 records in it. I would like a macro that enables me to delete a record and then move all the others up. The complicated part is that I do not want it to copy any cells below the 30 records. (I have other data here) As an example if I am in record 1 (e.g. A1) and choose to delete it, the macro moves (copies) cells A2:A30. If I am in record 2 and choose to delete it, the macro moves (copies) cells A3:A30. As you can see I need to use relative addressing for one part of the range(A3) but not the lower limit (A30). Is this possible? If so how? thanks Lewis Brunton |
All times are GMT +1. The time now is 04:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com