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

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Tim_Excel_

Well-known Member
Joined
Jul 12, 2016
Messages
512
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.
 
L

Legacy 287389

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

Tim_Excel_

Well-known Member
Joined
Jul 12, 2016
Messages
512
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.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,519
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS

ADVERTISEMENT

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:

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,519
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
@juriemagic,

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

Legacy 287389

Guest

ADVERTISEMENT

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
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,519
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
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?
 
L

Legacy 287389

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

Watch MrExcel Video

Forum statistics

Threads
1,109,385
Messages
5,528,400
Members
409,817
Latest member
JiNXX9500

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top