I'm just starting to use Macro for excel.
I have a list of data on a spreadsheet, each has been changed to a symbol using VLookUp
I am trying to write a short Macro to check for matching symbol.
For example a list of the following data
Row 1 "START" will match to symbol "&"
Row 2 "STOP" will match to symbol "#"
Row 3 "GO" will match to symbol "@"
Row 4 "PAUSE" will match to symbol "^"
Row 5 "STOP" will match to symbol "#"
Row 6 "START" will match to symbol "&"
Row 7 "PAUSE" will match to symbol "^"
Row 8 "STOP" will match to symbol "#"
Row 9 "GO" will match to symbol "@"
On a separate sheet, each input has its corresponding outcome in order
<tbody>
</tbody>
Now, this Macro will take the input data in the first row, and check within its array of the corresponding symbol outcome in seqeuence.
SO, based on the example, it will start checking from input data in ROW 1 "START" . The first row below it (ROW 2, has a symbol "#", as it doesn't match the assigned first sequence (^) , it checks the next column, Column Sequence 2 for "START" is "@", which matches the symbol on ROW3. The program returns a textbox with "Match found on Column Sequence 2".
It then skips 1 row before starting checking on the next input, in this example, match is found on Row 3 ("GO", with symbol "@"). It skips ROW 4 to rerun checking process on data in ROW 5 (STOP) which corresponds to "#". Checking horizontally, the column sequence for stop is "@, &, #, @" . Comparing with immediate rows below ROW 5, the symbol return a match on Row 8 ("STOP" or "#")
IF no match is found on all 4 column sequences, it will skip another 4 rows before starting matching column.
Please let me know how this can be best coded through VBA rather than using VlookupMatch().
Sorry if this is a repeat post, as I am really new to VBA I do not know how to implement it effectively.
Thank you very much!
I have a list of data on a spreadsheet, each has been changed to a symbol using VLookUp
I am trying to write a short Macro to check for matching symbol.
For example a list of the following data
Row 1 "START" will match to symbol "&"
Row 2 "STOP" will match to symbol "#"
Row 3 "GO" will match to symbol "@"
Row 4 "PAUSE" will match to symbol "^"
Row 5 "STOP" will match to symbol "#"
Row 6 "START" will match to symbol "&"
Row 7 "PAUSE" will match to symbol "^"
Row 8 "STOP" will match to symbol "#"
Row 9 "GO" will match to symbol "@"
On a separate sheet, each input has its corresponding outcome in order
Input | Column Sequence1 | Column Sequence2 | Column Sequence 3 | Column Sequence 4 |
START | ^ | @ | $ | & |
STOP | @ | & | # | @ |
GO | # | ^ | @ | @ |
... | ... | ... | ... | ... |
<tbody>
</tbody>
Now, this Macro will take the input data in the first row, and check within its array of the corresponding symbol outcome in seqeuence.
SO, based on the example, it will start checking from input data in ROW 1 "START" . The first row below it (ROW 2, has a symbol "#", as it doesn't match the assigned first sequence (^) , it checks the next column, Column Sequence 2 for "START" is "@", which matches the symbol on ROW3. The program returns a textbox with "Match found on Column Sequence 2".
It then skips 1 row before starting checking on the next input, in this example, match is found on Row 3 ("GO", with symbol "@"). It skips ROW 4 to rerun checking process on data in ROW 5 (STOP) which corresponds to "#". Checking horizontally, the column sequence for stop is "@, &, #, @" . Comparing with immediate rows below ROW 5, the symbol return a match on Row 8 ("STOP" or "#")
IF no match is found on all 4 column sequences, it will skip another 4 rows before starting matching column.
Please let me know how this can be best coded through VBA rather than using VlookupMatch().
Sorry if this is a repeat post, as I am really new to VBA I do not know how to implement it effectively.
Thank you very much!