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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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