ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro to insert rows at varied locations (https://www.excelbanter.com/excel-discussion-misc-queries/204131-macro-insert-rows-varied-locations.html)

Hott_Mutt

Macro to insert rows at varied locations
 
I have a spread sheet with hundreds of entries as follows (similar, 4 columns)

[A] [b] [C] [D]

Pour No. Date Description Test Result
1 Jun. 2, 08 Column F3 1032.23
2 Jun. 4, 08 Footing G1 2226.35
3 July 8, 08 Slab 1a 7892.45
3 July 8, 08 Slab 1b 4978.58
3 July 8, 08 Slab 1c 1354.54
4 July 25, 08 Footing H 7896.11
5 Aug 17. 08 Column 6a 1273.99
5 Aug 17. 08 Column 6b 3664.99
6 Sep. 1, 08 Footing J 1244.98
7 Sep. 16, 08 Footing P 1005.63
8 Sep. 23, 08 Slab 3a 1004.88
8 Sept. 23, 08 Slab 3b 7715.13

Notice for example that pour #3 is associated with three different test
results on the same day. So the values are not unique in column [A], but
pours always happen on the same day.

I need a macro that will insert a row (and another to remove them) that
identify cutoff periods. These cut offs are specific dates that vary each
time (not always the first and last day of each month). I specify myself
what dates these are.

[A] [b] [C] [D]

Pour No. Date Description Test Result
1 Jun. 2, 08 Column F3 1032.23
2 Jun. 4, 08 Footing G1 2226.35
_________________JUNE CUT OFF_____________________________
3 July 8, 08 Slab 1a 7892.45
3 July 8, 08 Slab 1b 4978.58
3 July 8, 08 Slab 1c 1354.54
4 July 25, 08 Footing H 7896.11
5 Aug 17. 08 Column 6a 1273.99
_______________JULY AND AUGUST CUT OFF__________________
6 Sep. 1, 08 Footing J 1244.98
7 Sep. 16, 08 Footing P 1005.63
8 Sep. 23, 08 Slab 3a 1004.88
8 Sept. 23, 08 Slab 3b 7715.13
___________________SEPTEMBER CUT OFF______________________


I need the macro to insert (and remove) the cutoff row at the same specific
location (identified by date or Pour #) each time I use it.
I want the inserted rows to have varied text/title per cutoff.

Please help. I tried to be very clear with my description. Im strong with
most things on excel, but I just started using macros.



All times are GMT +1. The time now is 06:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com