****** content="Microsoft SafeHTML" name=Generator><STYLE>.ExternalClass .ecxhmmessage P{padding:0px;}.ExternalClass body.ecxhmmessage{font-size:10pt;font-family:Tahoma;}</STYLE>Tried to write VBA and became rather puzzled in how to do this in VBA.
I have a table (Table C) located in the current worksheet.
The current worksheet name may vary and not a constant name.
'Table C' cell area extents from J8:U1000
The first column in 'Table C' (J8:J1000), some cells will contain a marker denoted with the character letter "A" and the other cells will be blank \ empty.
The aim of this marco is to:
1. Go through each record in 'Table C' with reference to to identifying if each record has a marker "A" text in column J.
2. If the record has a "A" marker in column J:
a) Copy the current targeted row record range (For example, K8:U8, which excludes cell J8) and paste the values\text only of this record data into table (Table F) found in a worksheet call "output". The 'Table F' table starts at cell B5 in the worksheet called "output".
b) Next, move back to the current worksheet and proceed onto the next record down in 'Table C'.
3. If no record has a "A" marker, in column J, then move onto the next record down in 'Table C'.
4. If another record has a "A" marker in column J. Then repeat point 2 (note: different row data ranges) and add this target record data to the other records found in 'Table F' in the worksheet call "output".
5. Continue on examining all of the records in 'Table C' until all 992 records have been examined and all identified "A" records are copied to over to 'Table F'.
Is this doable in VBA without using the MS Excel filters with bulk copy and paste, as I find this route is less flexible in understanding how array coding and looping works.
Any help is appreciated.
Many thanks in advance.
Brenda
I have a table (Table C) located in the current worksheet.
The current worksheet name may vary and not a constant name.
'Table C' cell area extents from J8:U1000
The first column in 'Table C' (J8:J1000), some cells will contain a marker denoted with the character letter "A" and the other cells will be blank \ empty.
The aim of this marco is to:
1. Go through each record in 'Table C' with reference to to identifying if each record has a marker "A" text in column J.
2. If the record has a "A" marker in column J:
a) Copy the current targeted row record range (For example, K8:U8, which excludes cell J8) and paste the values\text only of this record data into table (Table F) found in a worksheet call "output". The 'Table F' table starts at cell B5 in the worksheet called "output".
b) Next, move back to the current worksheet and proceed onto the next record down in 'Table C'.
3. If no record has a "A" marker, in column J, then move onto the next record down in 'Table C'.
4. If another record has a "A" marker in column J. Then repeat point 2 (note: different row data ranges) and add this target record data to the other records found in 'Table F' in the worksheet call "output".
5. Continue on examining all of the records in 'Table C' until all 992 records have been examined and all identified "A" records are copied to over to 'Table F'.
Is this doable in VBA without using the MS Excel filters with bulk copy and paste, as I find this route is less flexible in understanding how array coding and looping works.
Any help is appreciated.
Many thanks in advance.
Brenda