Hi,
I have macro working whereby it will delete all rows that have less than number four in column E.
However I want a variable to be set in stead of me inputting 4 in the code however it is not working when i set a variable. Any ideas? if you need full code let me know
Below is not full code but the "<HeroName" is not working but "<4" is?
Dim HeroName As String
HeroName = Range("E4").Value (Value is 4 in this cell)
DeleteValue = "<HeroName"
'DeleteValue = "<4" (works when i do this)
Filter code below and it works
.Range("E1:E" & .Rows.Count).AutoFilter Field:=1, Criteria1:=DeleteValue
I have macro working whereby it will delete all rows that have less than number four in column E.
However I want a variable to be set in stead of me inputting 4 in the code however it is not working when i set a variable. Any ideas? if you need full code let me know
Below is not full code but the "<HeroName" is not working but "<4" is?
Dim HeroName As String
HeroName = Range("E4").Value (Value is 4 in this cell)
DeleteValue = "<HeroName"
'DeleteValue = "<4" (works when i do this)
Filter code below and it works
.Range("E1:E" & .Rows.Count).AutoFilter Field:=1, Criteria1:=DeleteValue