![]() |
How to find last row in import
I import a data file. There can be as few as 3 lines or as
many as several thousand. I am formatting the import to be a report. Here is my difficulty: I need to insert the text "TOTAL" in column H in the second blank row beneath the last entry. I need to insert the formula "=sum(j4:j[whatever])" in column J in the same row. Sometimes imported records will create a multi-line entry in a column other than H or J, resulting in blank cells in column H and J. How do I find the last row and put in the text and formula I need? Any ideas or suggestions on where to look? Thanks. |
How to find last row in import
lastrow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count This will give you the last used row. You need help filling in th text/formulas too or no? - Piku -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 05:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com