Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I tried using the following code to update the forms below, but I obviously
have something wrong because it does nothing. What I want to do is delete Row in which Column C is less than 1, and then shift the next row following the deleted row to shift up to the blank row. I only tried it for Columns A,B and C. What do I need to do? I know I'm asking someone to write my code, but I'm new to Excel and VB and could sure use some help. Sub UpdateForm() Set CurrentRange = Range("A14:C14") Do Until Range("C14") 0 Set NextRange = CurrentRange If Range("C14") < 1 Then CurrentRange.EntireRow.Delete End If Set CurrentRange = NextRange Loop End Sub A B C G H I Account Date Amount Account Date Amount 14 cd 2/13/2009 4 bf 2/13/2009 6 15 wf 2/13/2009 3 af 2/13/2009 2 16 we 2/13/2009 56 gf 2/13/2009 34 17 qe 2/13/2009 23 bg 2/13/2009 16 18 rt 2/13/2009 0 fg 2/13/2009 0 19 yu 2/13/2009 23 yk 2/13/2009 45 20 ty 2/13/2009 8 lu 2/13/2009 2 21 ui 2/13/2009 9 tq 2/13/2009 8 22 op 2/13/2009 0 de 2/13/2009 0 23 th 2/13/2009 34 wc 2/13/2009 11 24 bn 2/13/2009 2 bz 2/13/2009 98 25 cv 2/13/2009 1 hm 2/13/2009 1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to loop | Excel Discussion (Misc queries) | |||
if & Loop | Excel Discussion (Misc queries) | |||
do..loop | Excel Discussion (Misc queries) | |||
while loop | Excel Worksheet Functions | |||
help with a loop | Excel Discussion (Misc queries) |