Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have in the A column a mixture of text and 0 values. I want to find the row number of last row that contains text and delete any row below that with a zero value. This macro works fine in Excel 2002 (English version) Sub Macro1() ' Dim i As Integer For i = Range("A" & Rows.Count).End(xlUp).Row To 10 Step -1 If Range("A" & Rows.Count).End(xlUp).Value = 0 Then Range("A" & Rows.Count).End(xlUp).ClearContents End If Next i Range("L89") = Range("A" & Rows.Count).End(xlUp).Row End Sub When I run this macro at work (Excel 97 with SP2, Swedish version) the line If Range("A" & Rows.Count).End(xlUp).Value = 0 Then gives me an error (Nr 13) Can anybody help me with this problem? Alf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Macro problem....... | Excel Discussion (Misc queries) | |||
Macro problem | Excel Discussion (Misc queries) | |||
Macro Problem | Excel Discussion (Misc queries) |