scoreboard macro problem

Olargee

New Member
Joined
May 31, 2011
Messages
14
hi there.. I'm not sure how the best way to phrase this is, but my problem is like this

I have a scoreboard from Cell A1 to A5

When I press a button the score number in Cell A1 increases by 1
I have managed to make a button that does this

How do I write the code to tell my button to increase the number in Cell A2 when a specific condition is met. Say for example.. the number in A1 is 10

And when cell A2 is at 10 I want the button to interact with cell A3 and so forth

Please help

Thanks in advance
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hello and Welcome,

Try this to get a feel for how If...then statements work.

Code:
Private Sub CommandButton1_Click()
    With ActiveSheet
        .Range("A1") = .Range("A1") + 1
        If .Range("A1") = 10 Then
            .Range("A1") = 0
            .Range("A2") = .Range("A2") + 1
            If .Range("A2") = 10 Then
                .Range("A2") = 0
                .Range("A3") = .Range("A3") + 1
            End If
        End If
    End With
End Sub

Not sure if you wanted to freeze the value at 10 when reached or reset to 0,
hopefully you can experiment with this to accomplish your task.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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