Move along one Cell???

Status
Not open for further replies.

martyloo

Board Regular
Joined
Sep 29, 2010
Messages
100
My code so far is.......

Sub Ace1_Click()
If IsEmpty(Range("B16")) Then
Range("B16") = 11
Else
Range("C16") = 11
End If
End Sub

All this does is if I press the relevant button "Ace1" it will display the value= 11 in cell B16, If i press this button again it will display the value=11 in cell C16, thats as far as my code goes.....

I would like it so if I press this button again it will display 11 in cell D16, if I press it again likewise cell E16, F16.

Not transferring the previous values. In the end if I click the button five times i want cells B16 C16 D16 E16 F16 all to have the value 11 in it.

Is this possible
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Why go through five clicks to fill five cells? Why not use a single click to fill the five cells?
 
Upvote 0
Perhaps
Code:
Sub Ace1_Click()
    Cells(16, Columns.Count).End(xlToLeft).Offset(, 1).Value = 11
End Sub
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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