Automatically check for last date and insert row below the last date

aakhan2011

New member
Joined
Jan 16, 2014
Messages
17
Reaction score
0
Points
0
I have a sheet(Sample.xlsx) in which weekly data is collected and this is done by using the VBA code(Present in Copy 1 and Copy 2 button in Master US.xlsm) written by me. But in my code, it inserts a new after asking two parameters, i.e. line range(i.e. row no for eg A64) and date. I want it to automatically search row containing last date and inserts row below it and this needs to be implemented in "Insert Automatically" and "Insert Date" button using VBA code in Master US.xlsm sheet.I dont have problem with second paramenter.


Logic i want to use :


Itergation of whole page
{
If (col A<>Date)&& col A=Average(i.e. contains average word)
then
inserts row above that row
And then ask for date to enter using date variable.


then inserts row above that row containing last week data in col A.
}

"Insert Automatically" in Master US.xlsm sheet is the button which takes system date and implements the above logic.
"Insert Date" in Master US.xlsm sheet is the button which ask for only date and implements the above logic.

If any other method/ideas to solve this, then it is really appreciated.

Sheets attached.

View attachment Master US.xlsm View attachment Sample.xlsx

Thanks in Advance. :)
 
Last edited:
Back
Top