AB33,
What I mean is, I need code that will calculate the difference between the month number I am trying to lookup using the index function and then subtract the value in cell C2.
y = WorksheetFunction.Index(Range("A16:N16"), 16, , "0.5")
'y is supposed to equal the number 12, which is the number of columns over
'Also y is a value that can change dependent upon the supplier
diff = "C2" - y 'diff is supposed to equal 2, which is the difference
'between the value in cell C2 and y
x = diff
After that I am trying to copy the values the suppliers are generating and then select the cell G7 and use an offset function to move it H7 or I7 dependent upon what "x" equals and the addition of the value under Net Terms cell (D2)
If Sheets("Supplier Input").Range("PPS_TERMS").Text = "Custom" Then
ActiveSheet.Range("A16:N16").Select
Selection.Copy
ActiveSheet.Range("G7").Offset(0, (x + ((Cells(2, 4).Value) / 30))).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
'I am trying to select the cell using offset and cell value D2 (net terms)
'To be able to shift where the first cell is selected
End If
I hope I made it more clear what I am trying to do and you are able to help.
Thanks,
Nate
Bookmarks