starsunny148
New Member
- Joined
- May 4, 2016
- Messages
- 3
Hi guys this is very urgent!,when i'm using below code macro's for creating looping till line no.7 everything is OK but the main problem is line no.8 . my actual problem is after completion of first loop it is showing maximum value in column 5 and row 1 but after second loop is over another maximum value got in column 5 and row 2 in excel but at the same time the value whatever is there in column 5 and row 1 is also changing so i do not want changing of first value after second loop and so on...... please help me in this very urgent
Code:
Sub MACRO1 ()
For pp = 1 To 5
Cells(1,1).Formula = pp
Cells(2, 1).Formula = pp / 10
Cells(3, 1).Formula = pp + 10
Cells(4, 1).Formula = pp * 10
Cells(5, 1).Formula = pp * 5 + 2
Cells(pp, 5).Value = "=Max(A1:A5)"
Next pp
End Sub