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..
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Look into UserForms, TextBoxes or ComboBoxes, and go from there.

Please note this is not a free code writing service, if you come up with some code and get stuck we can help you get going.
 
Upvote 0
WOW!!..

this is new....always used to get help here...okay, well, if no help is available anymore, I might as well quit this forum. Thanx..
 
Upvote 0
You're asking us to construct a completely new UserForm with code that performs the actions you mentioned without providing a starting point or any code you have tried/written beforehand.

I'm giving you a starting point to read into, so you can start writing and then come back if you run into any problems. See it as a "This is my problem, could you help?", instead of "Write my project for me" issue.
 
Upvote 0
There is NO requirement for people to have done any prior work. If you don’t want to answer a post, then don’t, but it is not your place to tell themwhat they should or shouldn’t be doing here.
 
Last edited:
Upvote 0
@juriemagic,

Notwithstanding my prior post, you should know the forum rules on cross-posting by now. Please comply with them.
 
Upvote 0
RoryA,

Yes I do know the rules, and I apologise. I will remove the post from excel help. I did that post as a result of me getting a mouthful from someone who obviously did not know what he was talking about. I actually expected me to be removed by the moderators. so, since it sounds like I just might get help on my issue, I will gladly remove the post as I indicated. Thanx RoryA
 
Upvote 0
We don't delete accounts. You can just stop using it or, if you like, we can deactivate it for you, though I'm not really sure why you would want/need us to?
 
Upvote 0
I'm trying to delete my account, or deactivate or whatever i can do just not to be a part of this forum anymore. i cannot seem to do it as a regular user, therefore my request.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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