jbridsworth
New Member
- Joined
- Mar 31, 2010
- Messages
- 14
Hi,
This is my first post about VBA, please let me know if somthing is unclear.
I'm trying to make a macro to copy data from a downloaded form (copied into Sheet2) into an table (on Sheet1) that I've setup. The information is all readable by excel, but I need to automate the process. From Sheet2, column A consists of different names & column B contains a number.
In my table - there is a similar list of names in column G. Each list has at least a few names that the other list does not have.
I need to copy the values from the form into the table & make sure they match up with the correct names. The column in the table where the values are being pasted will change each month.
I also need to know which names from the downloaded form were not found on my table.
For the last part - I was thinking of putting all the names on the form in bold & have the bold format removed when the value associated with it is copied over, this might require a seperate section in the macro.
For the copying - I was thinking of using Vlookup in the macro to do this but I'm not sure how to get past finding the value to pasting it in the right spot.
Here's a text version of what I want to do:
- format names in column A in Sheet2 to bold
- lookup first name in column G in Sheet1, find the same name in column A in Sheet2, get value from column B
- if name not found - move on to next name, if name found then unbold name in Sheet2
- copy result (from column B in Sheet2) & paste [value only] in appropriate row & column in Sheet1 (column based on month) - might be able to use a form of error checking - sum column J (rows 4-200), if above 0, then proceed to column K, etc., use first column with 0 as a result
- proceed to next name on the list until no more names
This should leave the names that were not found in bold so I could manually add them to the table & copy their value across.
This is my first post about VBA, please let me know if somthing is unclear.
I'm trying to make a macro to copy data from a downloaded form (copied into Sheet2) into an table (on Sheet1) that I've setup. The information is all readable by excel, but I need to automate the process. From Sheet2, column A consists of different names & column B contains a number.
In my table - there is a similar list of names in column G. Each list has at least a few names that the other list does not have.
I need to copy the values from the form into the table & make sure they match up with the correct names. The column in the table where the values are being pasted will change each month.
I also need to know which names from the downloaded form were not found on my table.
For the last part - I was thinking of putting all the names on the form in bold & have the bold format removed when the value associated with it is copied over, this might require a seperate section in the macro.
For the copying - I was thinking of using Vlookup in the macro to do this but I'm not sure how to get past finding the value to pasting it in the right spot.
Here's a text version of what I want to do:
- format names in column A in Sheet2 to bold
- lookup first name in column G in Sheet1, find the same name in column A in Sheet2, get value from column B
- if name not found - move on to next name, if name found then unbold name in Sheet2
- copy result (from column B in Sheet2) & paste [value only] in appropriate row & column in Sheet1 (column based on month) - might be able to use a form of error checking - sum column J (rows 4-200), if above 0, then proceed to column K, etc., use first column with 0 as a result
- proceed to next name on the list until no more names
This should leave the names that were not found in bold so I could manually add them to the table & copy their value across.