Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If Sheets(2).Cells(j, oppStatLoc).Value = OppStat Then
- Function getOppStat(OppStat As String)
- 'For testing Purposes
- Dim paramList
- Dim lastRow As Long, lastCol As Long, currentRow As Long, oppStatLoc As Long
- lastRow = Sheets("Parameter").Range("A65536").End(xlUp).Row
- lastCol = Sheets("Parameter").Range("XFD3").End(xlToLeft).Column
- currentRow = 2 'Sheets("OppStat").Range("A65536").End(xlUp).Row + 1
- 'Set Up Headerz
- For i = 1 To lastCol
- Sheets("Parameter").Cells(3, i).Copy _
- Destination:=Sheets("OppStat").Cells(1, i)
- Next i
- 'Look for OppStat Column
- For i = 1 To lastCol
- If Sheets("Parameter").Cells(3, i).Value = "Opportunity Status" Then
- oppStatLoc = i
- End If
- Next i
- 'Set Up Valuez
- For j = 4 To lastRow
- If Sheets(2).Cells(j, oppStatLoc).Value = OppStat Then
- For k = 1 To lastCol
- Sheets(2).Cells(j, k).Copy _
- Destination:=Sheets(3).Cells(currentRow, k)
- Next k
- currentRow = currentRow + 1
- End If
- Next j
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement