kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
Using this image as a guide:
The code below here is used to find a given date stored in the variable called "findvalue".
Now here are my requests:
1. If I want to delete say two rows between the found date, eg - 26-01-21 and the string "DAILY TOTALS", what are the lines that I need to write?
2. If I want to Add say two rows between the found date, eg - 26-01-21 and the string "DAILY TOTALS", what are the lines that I need to write?
Thanks in advance.
The code below here is used to find a given date stored in the variable called "findvalue".
Code:
Dim findvalue As Range, lr&, j&
Dim exp As Worksheet, c&, i&
Set exp = Sheets("EXPENSE")
lr = exp.Cells(Rows.Count, "A").End(xlUp).Row
If lr < 4 Then lr = 4
Set findvalue = exp.Range("A4:A" & lr).Find(what:=CDate(cboGetDate), LookIn:=xlValues, lookat:=xlWhole)
Now here are my requests:
1. If I want to delete say two rows between the found date, eg - 26-01-21 and the string "DAILY TOTALS", what are the lines that I need to write?
2. If I want to Add say two rows between the found date, eg - 26-01-21 and the string "DAILY TOTALS", what are the lines that I need to write?
Thanks in advance.