R
Ronny Hamida
I need to write a macro to do the following:
1) Remove any entire line when a value in column A
(labeled as JobCode) begins with a letter "R":
For instance -
Column A Column B
A539292 This line is a test
B192591 This line is another test
R182571 This entire line should be removed
C194712 This line is yet another test
2) Sort the data by Column C (already have this part done)
3) Sift through the data in Column C and inserting 2
blank lines after each time the first 4 digits in column C
changes:
For instance -
Column B Column C
Testing Line 2601999999
Testing Line 2601999999
Testing Line 2601999999
(blank line)
(blank line)
Testing Line 2602999999
Testing Line 2602999999
(blank line)
(blank line)
Testing Line 2603999999 (etc)
4) And if possible, while inserting the two blank lines,
is there something else I can do to automatically add what
is in Column D together between these blank lines and
change the font of this total? When I do this manually, I
use the AutoSum button and it works only because of the
blank lines seperating the rows.
Example:
Column C Column D
2601999999 1
2601999999 1
(blank) (total: 2 in red)
(blank line)
2602999999 1
2602999999 2
(blank) (total: 3 in red) etc.
As usual, thank you to everyone in advance who can help!
If it helps, my current macro labels the column headers
(which might be unnecessary). Also, my attempts to do
most of this have failed because whenever I wanted it to
evaluate 1 column, it continued to the next column. I've
since then removed that coding due to fustration... :-/
Confused as always,
Ronny
1) Remove any entire line when a value in column A
(labeled as JobCode) begins with a letter "R":
For instance -
Column A Column B
A539292 This line is a test
B192591 This line is another test
R182571 This entire line should be removed
C194712 This line is yet another test
2) Sort the data by Column C (already have this part done)
3) Sift through the data in Column C and inserting 2
blank lines after each time the first 4 digits in column C
changes:
For instance -
Column B Column C
Testing Line 2601999999
Testing Line 2601999999
Testing Line 2601999999
(blank line)
(blank line)
Testing Line 2602999999
Testing Line 2602999999
(blank line)
(blank line)
Testing Line 2603999999 (etc)
4) And if possible, while inserting the two blank lines,
is there something else I can do to automatically add what
is in Column D together between these blank lines and
change the font of this total? When I do this manually, I
use the AutoSum button and it works only because of the
blank lines seperating the rows.
Example:
Column C Column D
2601999999 1
2601999999 1
(blank) (total: 2 in red)
(blank line)
2602999999 1
2602999999 2
(blank) (total: 3 in red) etc.
As usual, thank you to everyone in advance who can help!
If it helps, my current macro labels the column headers
(which might be unnecessary). Also, my attempts to do
most of this have failed because whenever I wanted it to
evaluate 1 column, it continued to the next column. I've
since then removed that coding due to fustration... :-/
Confused as always,
Ronny