I want to save a range of data (X8:bz8) into an array on another sheet programmatically. When the code is run, I want it to do one of three things depending on the value of two cells. I can easily express it as a formula but I'm battling to get the code right. Assume the cell values are
1. Cell "A1" (will show TRUE or FALSE), and
2. Cell "V6" (will contain a string which is a unique identifier).
Condition 1: If A1 = False and V6 already exists in a range (say C2:C5000 on another sheet), overwrite the existing data in the array with the data in X8:BZ8
Condition 2: If A1 = False and V6 does not exist in the range C2:C5000, append the data to the end of the array
Condition 3: If A1 = TRUE, show a message box saying 'the data exists and the record is closed', and do not amend or append the data from X8:BZ8 anywhere. (This should probably be the first condition tested.)
The code I have so far is:
Any help is much appreciated.
Bookmarks