Private Sub VBA code

Copper Contributor

Hi, anyone could help to create a Private Sub vba code with below requirement?

 

I would like to have The formula on column P is, IF column R = Completed or Make appointment, column P = column O - column N +1, else, column P is empty.

which means when column N= 30 oct, column O = 31 Oct, actual duration of day on column P =2 days (include the first day).

 

For column Q, 
IF column R = Completed or Make appointment, column Q = column O - column K /7 and round up, else, column P is empty.
which means when column K= 30 oct, column O = 31 Oct, actual duration of weeks on column Q =1 week (include the first day); when column K= 20 oct, column O = 27 Oct, actual duration of weeks on column Q =1 week; when column K= 20 oct, column O = 28 Oct, actual duration of weeks on column Q =2 weeks.

 

For the above 2 formulas, No matter how the column R is change after once Completed or Make appointment is selected, column O P Q will remain unchange.

 

Attached below with the file to add on the vba code on "Todolist" sheet.

Appreciate if any expert could help on this.

Thank you very much!!

1 Reply
We're not here to write all code for you. Please show us what you've tried yourself and tell us where you got stuck.