Checking for matching data set vertically and horizontally on excel

wix111

New Member
Joined
Jul 21, 2017
Messages
2
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
InputColumn
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!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,215,757
Messages
6,126,695
Members
449,331
Latest member
smckenzie2016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top