Advertisement
Guest User

Untitled

a guest
May 19th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.85 KB | None | 0 0
  1.     With ws
  2.         .Cells(lRow, 1).Value = Key
  3.         .Cells(lRow, 2).Value = txtCourseTitle.Text
  4.         .Cells(lRow, 3).Value = cStartDate
  5.         .Cells(lRow, 4).Value = cEndDate
  6.         .Cells(lRow, 5).Value = Int(txtCourseFunding.Text)
  7.     End With
  8.    
  9.     With ws2
  10.         .Cells(lRow2, 1).Value = Key
  11.         .Cells(lRow2, 2).Value = "=VLOOKUP(A" & lRow2 & ", CourseTable, 2, FALSE)"
  12.         .Cells(lRow2, 3).Value = "=VLOOKUP(A" & lRow2 & ", CourseTable, 5, FALSE)"
  13.         .Cells(lRow2, 4).Value = "=COUNTIF(CourseName_Enrolment,B" & lRow2 & ")"
  14.         .Cells(lRow2, 5).Value = "=SUM(D" & lRow2 & "*C" & lRow2 & ")"
  15.         .Cells(lRow2, 6).Value = "=IF(AND(E" & lRow2 & "<1500, D" & lRow2 & ">5),$I$4,IF(AND(E" & lRow2 & "<1500, D" & lRow2 & "=5),$I$4/2,0))"
  16.         .Cells(lRow2, 7).Value = "=SUM(E" & lRow2 & "+F" & lRow2 & ")"
  17.     End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement