Hi please help me for this VBA code.
Sheet 1 is leave planner
Sheet 2 is Data (name &date&leave) are all in there
The native excel formula is
=xlookup = b5&c2, NAME&DATE, LEAVE,"")
And then drag it until
=xlookup = b5&AG2, NAME&DATE, LEAVE,"")
And also drag it down from
=xlookup = b5&c2, NAME&DATE, LEAVE,"")
=xlookup = b6&c2, NAME&DATE, LEAVE,"")
=xlookup = b7&c2, NAME&DATE, LEAVE,"")
=xlookup = b8&c2, NAME&DATE, LEAVE,"")
but im having a hard time please check my code. Im still new here i just need to finish this project please.
the result im getting is only for the first i need to get the same result like in normal excel.
For x = 5 to 55
Cells(x, 3) = application.evaluate("=xlookup(B&C2,NAME&DATE,LEAVE,"" "")")
Cells(x, 4) = application.evaluate("=xlookup(B&D2,NAME&DATE,LEAVE,"" "")")
Cells(x, 5) = application.evaluate("=xlookup(B&E2,NAME&DATE,LEAVE,"" "")")
Until
Cells(x, 33) = application.evaluate("=xlookup(B&AG2,NAME&DATE,LEAVE,"" "")")
Next X
End sub
Sheet 1 is leave planner
Sheet 2 is Data (name &date&leave) are all in there
The native excel formula is
=xlookup = b5&c2, NAME&DATE, LEAVE,"")
And then drag it until
=xlookup = b5&AG2, NAME&DATE, LEAVE,"")
And also drag it down from
=xlookup = b5&c2, NAME&DATE, LEAVE,"")
=xlookup = b6&c2, NAME&DATE, LEAVE,"")
=xlookup = b7&c2, NAME&DATE, LEAVE,"")
=xlookup = b8&c2, NAME&DATE, LEAVE,"")
but im having a hard time please check my code. Im still new here i just need to finish this project please.
the result im getting is only for the first i need to get the same result like in normal excel.
For x = 5 to 55
Cells(x, 3) = application.evaluate("=xlookup(B&C2,NAME&DATE,LEAVE,"" "")")
Cells(x, 4) = application.evaluate("=xlookup(B&D2,NAME&DATE,LEAVE,"" "")")
Cells(x, 5) = application.evaluate("=xlookup(B&E2,NAME&DATE,LEAVE,"" "")")
Until
Cells(x, 33) = application.evaluate("=xlookup(B&AG2,NAME&DATE,LEAVE,"" "")")
Next X
End sub