Coding problem (count records)

GaryPanic

Smoke me a Kipper,Skipper
Local time
Today, 12:09
Joined
Nov 8, 2005
Messages
3,309
I have a export into xls going ok ...
However I need to add some totalling in
the number of records ranges from 3 - to 1,000

however the totals need to be in row 9

so I need to be able count the records
then add this in somehow into my coding

below is one column

objActiveWkb.Worksheets("Oxygen Bound").Cells(7, 10) = "EL Premium (Excl Tax)"

I had in mind Cells(9,10)= SumCells 10.10 ? - the first field to ?? in excel it would sum(J10:Jxx)

this has really thrown me ...

any pointers
 
If counting the records why the sum
in Excel to count the number of non blanks in say column B you could code
CountA(B:B), however I have been informed that in EXcel 2007 the number of rows is over a million so full column notation could carry a overhead. Can you not di it either before the export or after using an Excel macro with something like

With ActiveSheet.UsedRange
lngLastRow = .Cells(1, 1).Row + .Rows.Count - 1
End With

Brian
 
well I can do a total qry and put the entries a from and get data from the form ...

but I was looking for a more "complete" solutions
 

Users who are viewing this thread

Back
Top Bottom