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>
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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