I'm new to the board as a user and pretty darn new to VBA so I apologize in advance for my lack of knowledge. I have a large table (not range) on sheet one. The table has fifteen columns and currently is at 65,000 records. The first column is a fifteen digit unique ID. We've just been told that I will periodically have to update many of the records, but the updates are not sequential so I can't just do a batch (1 - 10, for example). It might be record 1, 17, 19, 22, etc.
On a second worksheet in the same workbook I have a range where I paste the record numbers that I have to update. The range (not a named range) has the same column headers as the table on sheet one. I paste the record numbers in the left column. I make the updates to the data in the relevant columns in that location on the spreadsheet. To the right of that column is a "record duplicator" section which uses XLOOKUP to retrieve all the data on the relevant record and either use the values from the table on sheet 1 or replace it with the updated information. So, if I've update the values in columns 2, 3, and 7 then it uses those bits of info instead of what was in the original data. Other than those three columns the values from the data table are shown.
Using CELL and ADDRESS (I know I can do that in VBA and should/will) I've specified the cell address that needs to be updated with the new info at the left of the record duplicator range. I can then copy the information in the "record duplicator" section to the main data table on sheet one. BUT it has to go to each record individually and not be a general copy/paste.
I have a little bit of code that allows me to loop through the record duplicator range and continue to copy the data until it reaches the last line with data in it, but I'm sorely lacking when it comes to pasting that into the original data table in the correct row. My struggles have to do with using the cell address as the destination for the paste function. I know I can use FIND (or the location specified by my CELL & ADDRESS function, but since that changes for each row I'm struggling to make that dynamic. I've spent a lot of time looking on the board and elsewhere, but am just not finding what I need. If needed I'll put up some dummy data.
On a second worksheet in the same workbook I have a range where I paste the record numbers that I have to update. The range (not a named range) has the same column headers as the table on sheet one. I paste the record numbers in the left column. I make the updates to the data in the relevant columns in that location on the spreadsheet. To the right of that column is a "record duplicator" section which uses XLOOKUP to retrieve all the data on the relevant record and either use the values from the table on sheet 1 or replace it with the updated information. So, if I've update the values in columns 2, 3, and 7 then it uses those bits of info instead of what was in the original data. Other than those three columns the values from the data table are shown.
Using CELL and ADDRESS (I know I can do that in VBA and should/will) I've specified the cell address that needs to be updated with the new info at the left of the record duplicator range. I can then copy the information in the "record duplicator" section to the main data table on sheet one. BUT it has to go to each record individually and not be a general copy/paste.
I have a little bit of code that allows me to loop through the record duplicator range and continue to copy the data until it reaches the last line with data in it, but I'm sorely lacking when it comes to pasting that into the original data table in the correct row. My struggles have to do with using the cell address as the destination for the paste function. I know I can use FIND (or the location specified by my CELL & ADDRESS function, but since that changes for each row I'm struggling to make that dynamic. I've spent a lot of time looking on the board and elsewhere, but am just not finding what I need. If needed I'll put up some dummy data.