LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Find last row; down 2 rows, enter formula

If one follows your example's instructions, rather than your example's
cell references, one way:

Dim rRng As Range
Set rRng = Range("I3:I" & Range("I" & Rows.Count).End(xlUp).Row)
With rRng.Offset(rRng.Count + 1, 0).Resize(1, 1)
.Formula = "=SUBTOTAL(109," & rRng.Address(False, False) & ")"
.AutoFill .Resize(1, 3)
.Formula = Application.Substitute(.Formula, "103,", "109,")
End With


In article ,
"swatsp0p" wrote:

Please translate the following commands into working code.

start in column I
find the last row
go down two more rows (leaving one blank row)
enter formula =SUBTOTAL(103,I3:I*)
move one cell right (col K)
enter formula =SUBTOTAL(109,J2:J*)
move one more cell right (col L)
enter formula =SUBTOTAL(109,L2:L*)

* = the last row with data above current row.

Thank you.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enter a formula that will update as more rows are added? ChuckT12624 Excel Worksheet Functions 3 October 25th 08 05:05 AM
Find text and enter in new cell tommcbrny Excel Discussion (Misc queries) 4 May 9th 08 06:56 PM
What does hitting Ctrl + Shift + Enter to enter a formula do??? Help a n00b out. qwopzxnm Excel Worksheet Functions 2 October 20th 05 09:06 PM
I need a formula to find rows within a date range in one column? M. Penney Excel Worksheet Functions 5 May 12th 05 12:32 AM
Find, Offset, Enter Number BUBBA Excel Programming 2 January 9th 04 11:33 PM


All times are GMT +1. The time now is 10:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"