Hello, I am still struggling with my VBA skills and trying to figure out how to do this. I can picture in my head what I need to do, but nothing is working for me with VBA.
Here is my raw data, or a sample of data:
I am currently using VBA to take that and break it out in to columns, all that is good.
What I want to do now is compare how many times the value of "2100" is in what will be my column-B and then compare that to the one line of data that starts with "5000" and has a value in Column-C.
In the above example There are four (4) instances of "2100" and as you can see for the line with "5000" in it shows a "4" for what will be column-C so that would be good. I want to flag that value in the "5000" line if it doesn't match the total number of "2100" values in the data set. So if it was a 3 in this example I would want to turn the cell Red and make the Text bold.
Thanks for any help.
Phil
Here is my raw data, or a sample of data:
Code:
1000,1.0,RLZSUA1,02022018092900,2100,1.0,SPIF41,PG001,40.00,USD,01262018,02262108,950,0.00,0.00,,,,,YES,,,,,8000575,1,1,,,,,,,,,,,,,,,,
3000,1.0,SPIF41,1,45645a,10302017,,5.00,,5.00,testing comments,,,,
3000,1.0,SPIF41,2,45645b,10302017,,5.00,,5.00,testing comments,,,,
3000,1.0,SPIF41,3,45645c,10302017,,5.00,,5.00,testing comments,,,,
3000,1.0,SPIF41,4,45645d,10302017,,5.00,,5.00,testing comments,,,,
3000,1.0,SPIF41,5,45645e,10302017,,5.00,,5.00,testing comments,,,,
3000,1.0,SPIF41,6,45645f,10302017,,5.00,,5.00,testing comments,,,,
3000,1.0,SPIF41,7,45645g,10302017,,5.00,,5.00,testing comments,,,,
3000,1.0,SPIF41,8,45645h,10302017,,5.00,,5.00,testing comments,,,,
2100,1.0,SPIF42,PG001,555.00,USD,01262018,02262108,950,,,,,,,YES,Notes,,,,8000720,1,1,,,,,,,,,,,,,,,,
3000,1.0,SPIF42,1,163,11012017,,500.00,,500.00,,,,,
3000,1.0,SPIF42,2,936,11052017,,5.00,,5.00,,,,,
2100,1.0,SPIF43,PG001,250.00,USD,01262018,02262108,950,,,,,250.00,250.00,YES,Notes,,,,8000720,1,1,,,,,,,,,,,,,,,,
3000,1.0,SPIF43,1,741,11052017,,250.00,,250.00,,,,,
2100,1.0,SPIF50,PG001,95.00,USD,,02262018,950,,,,,,,YES,,,,,,,,,,Elmer Fudd Rabbit Farm,Elmer.Fudd@xyz.com,,,,,,,,,,,,
3000,1.0,SPIF50,63,11012017,,100.00,,100.00,,,,,
3000,1.0,SPIF50,2,13,11012017,,-5.00,,-5.00,,,,,
5000,4,,
I am currently using VBA to take that and break it out in to columns, all that is good.
What I want to do now is compare how many times the value of "2100" is in what will be my column-B and then compare that to the one line of data that starts with "5000" and has a value in Column-C.
In the above example There are four (4) instances of "2100" and as you can see for the line with "5000" in it shows a "4" for what will be column-C so that would be good. I want to flag that value in the "5000" line if it doesn't match the total number of "2100" values in the data set. So if it was a 3 in this example I would want to turn the cell Red and make the Text bold.
Thanks for any help.
Phil
Last edited by a moderator: