skandi
06-29-2009, 07:25 AM
Hello all
I am sort of working on a "cool" macro.
this is what I have:
A spreadsheet called "P" in there are 2 columns "p1" and "p2"
now to begin with I have added borders to 4 rows below the heading.
so we have heading
"p1" "p2"
1 |__| ___|
2 |__| ___|
3 |__| ___|
4 |__| ___|
what I want the vba program to do is.. as soon as you come to the last cell (i.e row 4 of p2) I want it to automatically add a new row below with the borders.
So in other words, I need to check the following:
for the pseudocode lets assume p1 to be column A and p2 to be column B
so if B4 has text in it and HAS borders, insert an additional row below with the same border formating as row 4. If not, don't do anything.
I am having trouble writing the if statements. any help would be greatly appreciated.
-thanks
Skandi
I am sort of working on a "cool" macro.
this is what I have:
A spreadsheet called "P" in there are 2 columns "p1" and "p2"
now to begin with I have added borders to 4 rows below the heading.
so we have heading
"p1" "p2"
1 |__| ___|
2 |__| ___|
3 |__| ___|
4 |__| ___|
what I want the vba program to do is.. as soon as you come to the last cell (i.e row 4 of p2) I want it to automatically add a new row below with the borders.
So in other words, I need to check the following:
for the pseudocode lets assume p1 to be column A and p2 to be column B
so if B4 has text in it and HAS borders, insert an additional row below with the same border formating as row 4. If not, don't do anything.
I am having trouble writing the if statements. any help would be greatly appreciated.
-thanks
Skandi