Odd and even cells
Solved/Closed
whatsit
-
Jul 28, 2016 at 01:09 AM
YasserKhalil Posts 6 Registration date Saturday February 20, 2016 Status Member Last seen July 31, 2016 - Jul 31, 2016 at 02:40 PM
YasserKhalil Posts 6 Registration date Saturday February 20, 2016 Status Member Last seen July 31, 2016 - Jul 31, 2016 at 02:40 PM
Related:
- Odd and even cells
- Excel arrow keys not moving cells - Guide
- Excel macro to create new sheet based on value in cells - Guide
- Arrow keys scrolling in Excel ✓ - Excel Forum
- Based on the values in cells b77 ✓ - Excel Forum
- Copy cells from one sheet to another - Guide
3 responses
YasserKhalil
Posts
6
Registration date
Saturday February 20, 2016
Status
Member
Last seen
July 31, 2016
1
Jul 28, 2016 at 01:30 AM
Jul 28, 2016 at 01:30 AM
Try this in sheet module
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$1" Then
Application.EnableEvents = False
If Target.Value = "" Then Range("F6").ClearContents: GoTo Skipper
If IsNumeric(Target) And Target.Value <> "" Then
If Target Mod 2 = 0 Then
Range("F6").Value = Target.Value + 1
Else
Range("F6").Value = Target.Value
End If
End If
Skipper:
Application.EnableEvents = True
End If
End Sub
Thank you for your quick response. However when I try to run the macro a message comes up "can't execute code in break mode". Any ideas? Thanks again.
YasserKhalil
Posts
6
Registration date
Saturday February 20, 2016
Status
Member
Last seen
July 31, 2016
1
Jul 28, 2016 at 02:58 PM
Jul 28, 2016 at 02:58 PM
Press Alt+F11 to open VBE editor
Click Square Button (Reset) in Standard toolbar
Make sure there are no breakpoints
Click Square Button (Reset) in Standard toolbar
Make sure there are no breakpoints
thank you. You have been very helpful.
YasserKhalil
Posts
6
Registration date
Saturday February 20, 2016
Status
Member
Last seen
July 31, 2016
1
Jul 31, 2016 at 02:40 PM
Jul 31, 2016 at 02:40 PM
You're welcome. Glad I can offer some help