Split cell into arrays and compare them to cells in separate columns

f00dFights

New Member
Joined
Jul 12, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Im working on a small project and im having trouble going about implementing this.

Im trying to create a function which scans a column (job-trav-seq) and splits the values in each cell within a given range. It then compares these values to comparable cells in separate columns (so for instance job-trav-seq would have a cell 58546-05-10; this function would remove the dashes and compare the 58546 to job number, 05 to traveller ID and 07 to sequence No.

If there is a match then the loop should carry to the next cell until the process is complete, i as thinking of using range.find but the trouble im having is how to go about implementing it

any help would be most appreciated
 
This is what I got when I ran the macro. The results are in column D.
foodFights.xlsm
ABCDEFG
1Job-trav-seqJob NoTravellerOpSeqCompletedTaskcurrOpOperation
212345-0-10123450* 1001random job 1
323456-0-10234560* 1001random job 2
446533-1-104653311010random job 3
546533-1-204653312001random job 3
646533-1-304653313000random job 3
746533-1-404653314000random job 3
846533-1-50465331* 5001random job 3
953154-1-10531541* 1010random job 4
1053167-1-105316711010random job 5
1153167-1-205316712010random job 5
1253167-2-305316723010random job 5
1353167-2-40531672* 4001random job 5
1453194-4-105315421010random job 6
1553194-4-205315422010random job 6
1653194-4-305315423010random job 6
1753194-4-40531544* 4001random job 6
1861652-4-104765241010random job 7
1961653-4-104845341010random job 8
2051734-8-10517348* 1010random job 9
2155634-8-10556348* 1010random job 10
2258456-8-10584568* 1010random job 11
2364845-10-1064845101010random job 12
2464845-10-206484520* 2001random job 12
2574561-10-1074561101010random job 13
2674561-10-207456110* 2001random job 13
2783634-11-108363411* 1001random job 14
2892456-11-109245611* 1001random job 15
Sheet1 (3)
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
This is what I got when I ran the macro. The results are in column D.
foodFights.xlsm
ABCDEFG
1Job-trav-seqJob NoTravellerOpSeqCompletedTaskcurrOpOperation
212345-0-10123450* 1001random job 1
323456-0-10234560* 1001random job 2
446533-1-104653311010random job 3
546533-1-204653312001random job 3
646533-1-304653313000random job 3
746533-1-404653314000random job 3
846533-1-50465331* 5001random job 3
953154-1-10531541* 1010random job 4
1053167-1-105316711010random job 5
1153167-1-205316712010random job 5
1253167-2-305316723010random job 5
1353167-2-40531672* 4001random job 5
1453194-4-105315421010random job 6
1553194-4-205315422010random job 6
1653194-4-305315423010random job 6
1753194-4-40531544* 4001random job 6
1861652-4-104765241010random job 7
1961653-4-104845341010random job 8
2051734-8-10517348* 1010random job 9
2155634-8-10556348* 1010random job 10
2258456-8-10584568* 1010random job 11
2364845-10-1064845101010random job 12
2464845-10-206484520* 2001random job 12
2574561-10-1074561101010random job 13
2674561-10-207456110* 2001random job 13
2783634-11-108363411* 1001random job 14
2892456-11-109245611* 1001random job 15
Sheet1 (3)
I just checked, it was the filter at the top that only showed the bottom row. Thanks you're a life saver :)
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,272
Members
449,075
Latest member
staticfluids

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