Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I am an macro / vba extreme newbie so please don't laugh. We receive a comma delimited txt file and I am writing a macro to take care of a log of the generic formatting issues we use on every file to get it ready for use. As it stands right now I have a start date in column H and an end date in I and the macro is already subtracting the two to give me a length in column J. What I am trying to do is add a sum and a count after the last row in column J. The problem is that every file will have a different number of records. Following is the tail end section of my code, like I said earlier, I am very new at this so please don't laugh. Thank you in advance for your help. ActiveCell.FormulaR1C1 = "LOS" Range("J6").Select ActiveCell.FormulaR1C1 = "=RC[-1]-RC[-2]" Range("J6").Select Selection.NumberFormat = "General" Selection.Copy lr = Cells(Rows.Count, "a").End(xlUp).Row Range("j6:j" & lr).Select ActiveSheet.Paste Application.CutCopyMode = False Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic Range in Excel that won't count formulas | Excel Discussion (Misc queries) | |||
Count dynamic range | Excel Worksheet Functions | |||
Macro to add count forumla with dynamic range | Excel Programming | |||
Dynamic Named Range count | Excel Programming | |||
count and sum of dynamic range ???? | Excel Programming |