Actions based on an activated cell

USAMax

Well-known Member
Joined
May 31, 2006
Messages
827
I built a function that will pull options from the imported data. Cell B2 will always have the first option box and if there are 25 options they will continue down to B26. The next set of options will be from F2 to F26 then columns J and N depending on how many options there are.

First: How do I tie a routine to the cell that. Once the cell is selected or activated the routine needs to run.
Second: What is a good check mark to place in the cell to show that that option is active.

I am not using a User Forms or Check Boxes because this sheet has to be dynamic. The content will keep changing.
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

USAMax

Well-known Member
Joined
May 31, 2006
Messages
827
I found a way to do what I want but I have to Double Click.

Everyone has always been amazing in the past so I do not need to take up anyone's time.


Private Sub worksheet_beforedoubleclick(ByVal Target As Range, Cancel As Boolean)
Set Target = ActiveCell
ActiveCell.Select
Cancel = True
If ActiveCell.FormulaR1C1 = "" Then
ActiveCell.FormulaR1C1 = "ü"
Else
ActiveCell.FormulaR1C1 = ""
End If
Call Prep(Target, Cancel)
End Sub

Thank you,
 

Watch MrExcel Video

Forum statistics

Threads
1,109,400
Messages
5,528,518
Members
409,821
Latest member
decibelpilot

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