Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Function Gre()
  2. Range("E2").Select
  3. ActiveCell.FormulaR1C1 = "Under"
  4. Range("F2").Select
  5. ActiveCell.FormulaR1C1 = "Over"
  6. Range("G2").Select
  7. ActiveCell.FormulaR1C1 = "Result"
  8.  
  9. With Range("E2:E" & Cells(Rows.Count, "C").End(xlUp).Row)
  10. .Formula = "=IF(C2<B2,B2-C2,"")"
  11. End With
  12. With Range("F2:F" & Cells(Rows.Count, "C").End(xlUp).Row)
  13. .Formula = "=IF(C2>B2,C2-B2,0)"
  14. End With
  15. With Range("G2:G" & Cells(Rows.Count, "C").End(xlUp).Row)
  16. .Formula = "=IF(F2>0,'Issue',"")"
  17. End With
  18. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement