simonwait
asked on
Countif string is within cells in range
Using VBA I am looking at finding how many cells within colum A range contain the following:-
Clear Move ;0
an example of a typical cell within the range is
2012-03-03; 21:18:55 ;PlayBack ?_? ;As008 ;Clear Move ;0 ;Positie ;-344 ; ; ; ;
What is the most elegant way (without next, for loops as the sheets are huge)
Thanks
Clear Move ;0
an example of a typical cell within the range is
2012-03-03; 21:18:55 ;PlayBack ?_? ;As008 ;Clear Move ;0 ;Positie ;-344 ; ; ; ;
What is the most elegant way (without next, for loops as the sheets are huge)
Thanks
ASKER
So if this is a typical few lines within the sheet:-
2012-03-21; 00:00:16 ;PlayBack 2_1 ;DT 1 ;Nieuwe storing ;65407459 ; ; ; ; ; ;
2012-03-21; 00:00:17 ;PlayBack ?_? ;DT 1 ;Clear Move ;0 ;Positie ;100 ; ; ; ;
2012-03-21; 00:00:18 ;PlayBack 2_1 ;DT 2 ;Nieuw Doel ;600 ;Positie, Delay,
2012-03-21; 00:00:18 ;PlayBack 2_1 ;DT 3 ;Nieuw Doel ;2000 ;Positie, Delay,
2012-03-21; 00:00:23 ;PlayBack ?_? ;DT 2 ;Clear Move ;0 ;Positie ;599 ; ; ; ;
2012-03-21; 00:00:23 ;PlayBack ?_? ;DT 3 ;Clear Move ;0 ;Positie ;2000 ; ; ; ;
I need to count the clear moves without a Nieuwe storing above them (where the DT number is also the same).
IE the second line should be counted because the line above is the sma e DT (DT1) and has a Niuewe storing string in it. Lines 5 & 6 shouldnt be counted as their previous lines do not.
Thanks
2012-03-21; 00:00:16 ;PlayBack 2_1 ;DT 1 ;Nieuwe storing ;65407459 ; ; ; ; ; ;
2012-03-21; 00:00:17 ;PlayBack ?_? ;DT 1 ;Clear Move ;0 ;Positie ;100 ; ; ; ;
2012-03-21; 00:00:18 ;PlayBack 2_1 ;DT 2 ;Nieuw Doel ;600 ;Positie, Delay,
2012-03-21; 00:00:18 ;PlayBack 2_1 ;DT 3 ;Nieuw Doel ;2000 ;Positie, Delay,
2012-03-21; 00:00:23 ;PlayBack ?_? ;DT 2 ;Clear Move ;0 ;Positie ;599 ; ; ; ;
2012-03-21; 00:00:23 ;PlayBack ?_? ;DT 3 ;Clear Move ;0 ;Positie ;2000 ; ; ; ;
I need to count the clear moves without a Nieuwe storing above them (where the DT number is also the same).
IE the second line should be counted because the line above is the sma e DT (DT1) and has a Niuewe storing string in it. Lines 5 & 6 shouldnt be counted as their previous lines do not.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER