![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Hengelo
Posts: 79
|
Sub Test()
[A1].End(xlToRight)(1, 2).Formula = "=SUM([A1]:[A1].End(xlToRight))" End Sub Why doesn't this macro work? I have x numbers in row 1. I want to total the numbers in the cell next to Ax!
__________________
Best regards, Martin J.A. Maatman Oonk |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
Quote:
[a1].End(xlToRight)(1, 2).Formula = "=sum(A1:" & Range("A1").End(xlToRight).Address & ")" HTH, D |
|
|
|
|
|
|
#3 | ||
|
Board Regular
Join Date: Feb 2002
Location: Hengelo
Posts: 79
|
Quote:
__________________
Best regards, Martin J.A. Maatman Oonk |
||
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|