Related:
- Macro for a range
- Spell number in excel without macro - Guide
- Apple airtag range - Guide
- Macro excel download - Download - Spreadsheets
- Excel macro to create new sheet based on value in cells - Guide
- Run macro on opening workbook - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Aug 24, 2010 at 06:54 AM
Aug 24, 2010 at 06:54 AM
it is not clear why this code statement
I shall rather than have the macro like this see whether this solves your problem
If .Address(False, False) = c.Address Then
I shall rather than have the macro like this see whether this solves your problem
Sub test() Dim r As Range, c As Range Set r = Range("A1:A30") For Each c In r With c 'If .Address(False, False) = c.Address Then 'If IsNumeric(.Value) Then If IsNumeric(c) Then Application.EnableEvents = False c.Offset(0, 1).Value = c.Offset(0, 1).Value + .Value Application.EnableEvents = True End If End With Next c End Sub