morinia
asked on
defining and comparing the value of a cell in VB
I have the following statement in VB;
PROD = Cells(stateRow, 2).Value
I am trying to compare the contents of this cell (which changes relative to the row)
The length of the contents is variable.
I would like to compare the contents of this cell to another cell (PRODX) on a spreadsheet to use in a sumifs statement in VB.
The challenge is the the value of PRODX can be the value of PROD & "*"
Can someone tell me how to code a sumif in VB comparing PROD to PROD X.
This is an example of what I am using when I am matching two fields that are the same length
totYr = Round(Application.Workshee tFunction. SumIfs(Ran ge("pAuths "), _
Range("pEvent"), evtType, _
Range("pYr"), Pyr, _
Range("ProdX"), PROD) / Members, 2)
PROD = Cells(stateRow, 2).Value
I am trying to compare the contents of this cell (which changes relative to the row)
The length of the contents is variable.
I would like to compare the contents of this cell to another cell (PRODX) on a spreadsheet to use in a sumifs statement in VB.
The challenge is the the value of PRODX can be the value of PROD & "*"
Can someone tell me how to code a sumif in VB comparing PROD to PROD X.
This is an example of what I am using when I am matching two fields that are the same length
totYr = Round(Application.Workshee
Range("pEvent"), evtType, _
Range("pYr"), Pyr, _
Range("ProdX"), PROD) / Members, 2)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.