VBA/Macro For adding 1 to Cell Value Based on 2 Drop Downs (Row&Column)

leighton367

New Member
Joined
Jan 28, 2015
Messages
2
Hi to whomever could help me,

I am trying to create a Recognition progam in excel for my employees, and make it user friendly for others. I have created one sheet (Data) that has all the information stored Names and what we are recognizing them for. Then I have the User friendly sheet (YYD) that has One drop down for the name of the employee(Rows in column A on data sheet), and another drop down for the recognition card they recieved (Columns B,C,D,E on Data Sheet). Lastly, there is a button on the User friendly sheet (YYD) and I am trying to get the macro to add 1 to the cell of the row and column they selected on the drop downs, when they click the button.

Drop Down Cells on YYD Sheet- F12 (Names) and F17 (Recognition)

Button (Submit) to add 1 - Sub Submit()

Sample of Data sheet:
NamePeopleServiceSalesCredit
Bob413
Dana231
Eric312
Scott2111

<TBODY>
</TBODY>
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,615
Hello,

something like this?

Code:
Sub ADD_RECOGNITION()
    MY_NAME = Sheets("YYD").Range("F12").Value
    Select Case Sheets("YYD").Range("F17").Value
        Case "People"
            MY_OFFSET = 1
        Case "Service"
            MY_OFFSET = 2
        Case "Sales"
            MY_OFFSET = 3
        Case "Credit"
            MY_OFFSET = 4
    End Select
    Sheets("Data").Select
    Cells.Find(What:=MY_NAME, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
        :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
        False).Activate
    ActiveCell.Offset(0, MY_OFFSET).Value = ActiveCell.Offset(0, MY_OFFSET).Value + 1
End Sub
This doesn't have any error checking though.
 

Forum statistics

Threads
1,082,323
Messages
5,364,583
Members
400,809
Latest member
formulasataglance

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top