View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rpettis31 Rpettis31 is offline
external usenet poster
 
Posts: 49
Default Loop not working properly

I am trying to compare an item list to another sheet which contains a
multiplier.
So on sheet 1 ("data") if Item A is on Sheet 2 ("multiplier") then I look at
the multiplier column.
I then take this multiply factor times the quantities on the sheet 1 ("data")

For some reason this is not working and I am not sure why?

Dim MM As Integer
Dim MF As Integer
Dim MFactor As Integer

MM = 2

For Multi = 2 To 871

If Sheets("Data").Cells(Multi, 3) = Sheets("Multiplier").Cells(MM, 1) Then

MFactor = Sheets("Multiplier").Cells(MM, 3)

For MF = 15 To 27
Sheets("Data").Cells(Multi, MF) = Sheets("Data").Cells(Multi,
MF) * MFactor
Next MF

MM = MM + 1
End If

Next Multi