Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
PROBLEM: cannot accurately determine Last Row / Last Column on worksheet
using either of the two code sets below CAUSE: worksheet is a "shell" into which new files are pasted each month. They vary in both # of Rows and Columns each month. I delete rows and columns of prior month as a first step in macro. (I cannot close and re-open the worksheet - doesn't work either!) WHAT MAKES ME CRAZY! The resulting #s will be prior month's total rows and columns IF the prior month's file was larger. I've used the code sets below but neither accurately determines the last Row / Last Column. I must be missing something really basic (every pun intended!) All advice will be gratefully appreciated.' CODE SETS: ' FinalRow = ActiveCell.SpecialCells(xlCellTypeLastCell).Row FinalColumn = ActiveCell.SpecialCells(xlCellTypeLastCell).Column ' ' FinalRow = ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlRows).Row ' FinalColumn = ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByColumns).Column ' |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
inaccurate line chart | Charts and Charting in Excel | |||
Comparing two lists with one being inaccurate | Excel Discussion (Misc queries) | |||
sum inaccurate | Excel Worksheet Functions | |||
How do you correct inaccurate sumif totals? | Excel Worksheet Functions | |||
R1C1 to A1 inaccurate formula conversion | Excel Programming |