beki_bt
02-15-2012, 09:43 AM
Hi,
I have a piece of code below. This filters my data sheet to find the number of "Original"s in Ragnge("K"). There are 3 different Values in Range(K):
1. REQUEST_ASSET_HOLDER
2. PREVIEW
3. ORIGINAL
I need the end result to check how many "Original"s and if In Range(I) same raw is equal to a specific Country(ie United Kingdom). In a nuttshell I need to filer through my data sheet to find if a specific raw contains "Original" and "United Kingdom"
Thank you in advance!
----------------------------------------------------------------------
Sub Filter1()
Range("K1").Activate
Linebegin:
ActiveCell.Offset(ROWOFFSET:=1).Activate
Dim count As Integer
Line0:
If ActiveCell.Value <> "PREVIEW" Then GoTo Line1
GoTo Linebegin
Line1:
If ActiveCell.Value <> "REQUEST_ASSET_HOLDER" Then GoTo Line2
GoTo Linebegin
Line2:
If ActiveCell.Value = "" Then GoTo Line3
count = count + 1
GoTo Linebegin
Line3:
Worksheets("BPM").Range("D25").Value = count
End Sub
I have a piece of code below. This filters my data sheet to find the number of "Original"s in Ragnge("K"). There are 3 different Values in Range(K):
1. REQUEST_ASSET_HOLDER
2. PREVIEW
3. ORIGINAL
I need the end result to check how many "Original"s and if In Range(I) same raw is equal to a specific Country(ie United Kingdom). In a nuttshell I need to filer through my data sheet to find if a specific raw contains "Original" and "United Kingdom"
Thank you in advance!
----------------------------------------------------------------------
Sub Filter1()
Range("K1").Activate
Linebegin:
ActiveCell.Offset(ROWOFFSET:=1).Activate
Dim count As Integer
Line0:
If ActiveCell.Value <> "PREVIEW" Then GoTo Line1
GoTo Linebegin
Line1:
If ActiveCell.Value <> "REQUEST_ASSET_HOLDER" Then GoTo Line2
GoTo Linebegin
Line2:
If ActiveCell.Value = "" Then GoTo Line3
count = count + 1
GoTo Linebegin
Line3:
Worksheets("BPM").Range("D25").Value = count
End Sub