Hey guys, I've got something breaking this idex/match snippet of VBA and I can't find the issue. I can definitely elaborate on variable details or provide a sample sheet, but I didn't want to overclutter to start.
VBA:
Also, here is a working formula version if it helps:
Thanks
VBA:
Code:
For eachRow = 2 to lastRow
sd.Cells(eachRow, sdExclusionCol) = _
Application.WorksheetFunction.Index(cd.UsedRange, _
WorksheetFunction.Match(1, _
(cd.Columns(cdMaterialCol & ":" & cdMaterialCol) = sd.Cells(eachRow, sdMaterialCol)) * _
Int((cd.Columns(cdLevelCol & ":" & cdLevelCol)) = Int(sd.Cells(eachRow, sdLevelCol))), _
0), _
cdExclusionCol)
Next eachRow
Also, here is a working formula version if it helps:
Code:
=INDEX('Cd'!O:O,MATCH(1,('Cd'!K:K='Sd'!O24)*(INT('Cd'!N:N)=INT('Sd'!E24)),0),0)</SPAN>
Thanks