ianawwalker
New Member
- Joined
- Feb 16, 2023
- Messages
- 15
- Office Version
- 365
- 2021
- Platform
- Windows
Hello,
I have vba code to update records on an individual basis, but am struggling to find or figure out a way to do this on a bulk basis. For instance, I have a data that I've combined into a sheet that I need to update on my "records" sheet if there is a "Y" in a corresponding column. This code below works great if there are only 10 or less records to do, but there is a file of 10-15K items that need to update items on the "records" sheet. Pretty much it needs to review the loan number ranges in each sheet, both column A, find if there is a 0 (not a match, using match formula) in column K, it will replace the field in the "records" sheet with a "Y". Then if it doesn't find the loan number in the "records" sheet, it pastes the whole row to create the new entry. Any help on this is greatly appreciated!
Sheets("Input_Posting").Range("ValueToPost").Copy
Sheets("input_posting").Range("PostingRow").PasteSpecial xlPasteValues
Sheets("Input_Posting").Range("traildocformula").Copy Sheets("input_posting").Range("TrailingDocLocation")
Sheets("Input_Posting").Range("PostingRow").Copy
Sheets("Offline").Select
ActiveSheet.Range("a2").Select
ActiveCell.End(xlDown).Offset(1).Select
ActiveSheet.Paste
Sheets("input_Screen").Select
Range("LoanNum").Select
thank you,
Ian
I have vba code to update records on an individual basis, but am struggling to find or figure out a way to do this on a bulk basis. For instance, I have a data that I've combined into a sheet that I need to update on my "records" sheet if there is a "Y" in a corresponding column. This code below works great if there are only 10 or less records to do, but there is a file of 10-15K items that need to update items on the "records" sheet. Pretty much it needs to review the loan number ranges in each sheet, both column A, find if there is a 0 (not a match, using match formula) in column K, it will replace the field in the "records" sheet with a "Y". Then if it doesn't find the loan number in the "records" sheet, it pastes the whole row to create the new entry. Any help on this is greatly appreciated!
Sheets("Input_Posting").Range("ValueToPost").Copy
Sheets("input_posting").Range("PostingRow").PasteSpecial xlPasteValues
Sheets("Input_Posting").Range("traildocformula").Copy Sheets("input_posting").Range("TrailingDocLocation")
Sheets("Input_Posting").Range("PostingRow").Copy
Sheets("Offline").Select
ActiveSheet.Range("a2").Select
ActiveCell.End(xlDown).Offset(1).Select
ActiveSheet.Paste
Sheets("input_Screen").Select
Range("LoanNum").Select
thank you,
Ian