VBA find header and clear contents

L

Legacy 287389

Guest
Hi good people!,

Please assist me with this:

Sheet1 = Database
Sheet2 =View

Sheet "Database" has the following:

A1 = "01-01-2019"
A2 = "Handle"
B2 = "Win"
C2 = "Games"
D2 = "Theo Hold"

Then E1 = "02-01-2019"
E2 = "Handle"
F2 = "Win"
G2 = "Games"
H2 = "Theo Hold"

and so the pattern goes.

The columns with headers "Handle", "Win", "Games" and "Theo Hold", contain data underneath them going down to row 512. I am looking for a code please that will, once the button is clicked, give a msgbox prompting the date from where I want to clear data, then allow me to input for example "05-04-2019", after which the code will find the date in the Database sheet, find the cell in row 3 below this date, select from this cell down to row 512 and also select all cells going to the right, then clear all that content. The button will be on the View sheet.

I hope I have explained my need properly. please help me with this?..all help will be greatly appreciated!..Thank you kindly..
 
As I said, we don't delete accounts. If you don't want to use the forum any more for whatever reason, just stop using it. If you really want I can deactivate your account too.
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top