![]() |
![]() |
|
|||||||
| 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 |
|
Guest
Posts: n/a
|
Here is an extract of some code which is trying to insert the word "TOTALS" into a cell whose position can change (Hence the variable TotalRow). This part works!
However I'm also tring to insert a formula in the same row starting in Col N as far over as AH. Please help me. Thank you Range("M" & TotalRow).Value = "TOTALS" Range("N" & TotalRow, ("AH" & TotalRow)).Formula = "=SUBTOTAL(9, "N2:N" & LastRow)" |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Try using the macro recorder to get the required code.
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|