Hello Excel Forum Gurus,
I am attempting to make my first VBA macro to make life simpler when I get phone number updates from Verizon.
I have a list of the updated phone numbers, including whether the number is disconnected, or newly activated in a sheet called "VerizonUpdates"
I also have two blank sheets to process these entries into, "Processed" and "NotFound".
There are 4 possible outcomes for my information based on the two conditions:
(1) whether the phone number has already been processed and
(2) if it is a disconnect or newly activated line.
I want to take the first row of "VerizonUpdates" and get the phone number.
See if that phone number (column 11) matches any entries in "Processed"
If there is a match in processed, and it is a new activated number (signified by an "I" in column 6 in "VerizonUpdates)......overwrite the entire row in "Processed" where the match was found.
If there is a match in "Processed, and it is a disconnect number (signified by an "O" in column 6 of "VerizonUpdates")....delete the entire row in "Processed" where the match was found.
If there is NOT a match in "Processed" for the phone number, and it is a newly activated number.....I want to insert that row from "VerizonUpdates" to the top of the "Processed" sheet, pushing all its current entries down
If there is NOT a match in "Processed" for the phone number, and it is a disconnect number....I want to move the "VerizonUpdates" row to a new line on the "NotFound" sheet, signifying that the number was removed, but never on my Processed list
Here is my code so far: I am having particular difficulty with the foundRow, signifying the row where the match of the phone number from the Updates occured on the Processed sheet
Thank you for your help,Please Login or Register to view this content.
Adam
Please see a copy of the above with working data in my attachment or at http://ifile.it/10e32ok/VerizonUpdatesMacro_01.xlsm
I think that my answer lies in transferring Excel functions like Match Index Indirect Address into VBA functions like range. And also exploring the properties of the VBA objects.
Bookmarks