shadow12345
Well-known Member
- Joined
- May 10, 2004
- Messages
- 1,238
Hi,
I have this sheet
what i am trying todo is delete the row if the value in H is delete, i am using the code below but it not working ........... any thoughts
I have this sheet
Control Sheet - Broker Review.xls | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | Ref | Name | Book | Trade Count | Total Shares | Total Cash | Exchange | Book Match | ||
2 | 11427 | TULLETT PREBON 740 | KES1 | 4 | 2861434 | 126462159.8 | EAV | delete | ||
3 | 19339 | EXANE | #IHA | 1 | 875 | 270593.75 | EAV | delete | ||
4 | 264 | AMS EFFECTEN AEK | FIEC | 1 | 55000 | 1282985 | EBB | 21 | ||
5 | 266 | NATL BK OF CANADA | KBSA | 13 | 1131000 | 65914100 | EBB | delete | ||
6 | 2233 | BRINSON A/C PDP6 | EUR2 | 1 | 9037 | 159819.35 | EBB | delete | ||
7 | 10537 | KREDIETBANK SECS | CFEE | 6 | 94790 | 2192406.71 | EBB | delete | ||
Raw Data |
what i am trying todo is delete the row if the value in H is delete, i am using the code below but it not working ........... any thoughts
Code:
Sub deleterows()
Range("H2").Select
account = "delete"
For i = Range("h5000").End(xlUp).Row To 1 Step -1
If Range("h" & i) = account Then Rows(i).Delete
Next i
End Sub