Hi,
I was wondering if anyone might be able to help me here. How do i insert a new row in excel worksheets using VB?
For example, in the worksheets "Data", i have the following data as follows
A B C
1 Merchandise 500 300
2 02-000 300 400
3 Total 800 700
4 Grocery 1000 100
5 03-001 500 700
6 Total 1500 800
What I'd like to do is to be able to insert a newline after total, in this case, which is after row 3.
Here is my code that doesn't work.
If insertnewline = True Then
Worksheets("Data").Rows("3:3").Select
Worksheets.Selection.Insert Shift:=xlDown <--doesn't work
End If
Your help is greatly appreciated.
Thank you very much in advance
I was wondering if anyone might be able to help me here. How do i insert a new row in excel worksheets using VB?
For example, in the worksheets "Data", i have the following data as follows
A B C
1 Merchandise 500 300
2 02-000 300 400
3 Total 800 700
4 Grocery 1000 100
5 03-001 500 700
6 Total 1500 800
What I'd like to do is to be able to insert a newline after total, in this case, which is after row 3.
Here is my code that doesn't work.
If insertnewline = True Then
Worksheets("Data").Rows("3:3").Select
Worksheets.Selection.Insert Shift:=xlDown <--doesn't work
End If
Your help is greatly appreciated.
Thank you very much in advance