I would like a VBA code that will do the following: In workbook 'TaskTodayPA.xlsm' when…
- User
I would like a VBA code that will do the following:
In workbook 'TaskTodayPA.xlsm' when the sheet 'Today is activated, read the values of range E4:S4 in sheet 'Daily' from the workbook 'Schedule Checks.xlsm' which is in the same folder as workbook 'TaskTodayPA.xlsm'
Then
If sheet 'Daily' E4 value is y then sheet 'Today' C2 value should be x If sheet 'Daily' E4 value is d then sheet 'Today' D2 value should be x If sheet 'Daily' E4 value is n then sheet 'Today' E2 value should be x
If sheet 'Daily' F4 value is y then sheet 'Today' C3 value should be x If sheet 'Daily' F4 value is d then sheet 'Today' D3 value should be x If sheet 'Daily' F4 value is n then sheet 'Today' E3 value should be x
If sheet 'Daily' G4 value is y then sheet 'Today' C4 value should be x If sheet 'Daily' G4 value is d then sheet 'Today' D4 value should be x If sheet 'Daily' G4 value is n then sheet 'Today' E4 value should be x
If sheet 'Daily' H4 value is y then sheet 'Today' C5 value should be x If sheet 'Daily' H4 value is d then sheet 'Today' D5 value should be x If sheet 'Daily' H4 value is n then sheet 'Today' E5 value should be x
If sheet 'Daily' I4 value is y then sheet 'Today' C6 value should be x If sheet 'Daily' I4 value is d then sheet 'Today' D6 value should be x If sheet 'Daily' I4 value is n then sheet 'Today' E6 value should be x
If sheet 'Daily' J4 value is y then sheet 'Today' C7 value should be x If sheet 'Daily' J4 value is d then sheet 'Today' D7 value should be x If sheet 'Daily' J4 value is n then sheet 'Today' E7 value should be x
If sheet 'Daily' K4 value is y then sheet 'Today' C8 value should be x If sheet 'Daily' K4 value is d then sheet 'Today' D8 value should be x If sheet 'Daily' K4 value is n then sheet 'Today' E8 value should be x
If sheet 'Daily' L4 value is y then sheet 'Today' C9 value should be x If sheet 'Daily' L4 value is d then sheet 'Today' D9 value should be x If sheet 'Daily' L4 value is n then sheet 'Today' E9 value should be x
If sheet 'Daily' M4 value is y then sheet 'Today' C10 value should be x If sheet 'Daily' M4 value is d then sheet 'Today' D10 value should be x If sheet 'Daily' M4 value is n then sheet 'Today' E10 value should be x
If sheet 'Daily' N4 value is y then sheet 'Today' C11 value should be x If sheet 'Daily' N4 value is d then sheet 'Today' D11 value should be x If sheet 'Daily' N4 value is n then sheet 'Today' E11 value should be x
If sheet 'Daily' O4 value is y then sheet 'Today' C12 value should be x If sheet 'Daily' O4 value is d then sheet 'Today' D12 value should be x If sheet 'Daily' O4 value is n then sheet 'Today' E12 value should be x
If sheet 'Daily' P4 value is y then sheet 'Today' C13 value should be x If sheet 'Daily' P4 value is d then sheet 'Today' D13 value should be x If sheet 'Daily' P4 value is n then sheet 'Today' E13 value should be x
- Assistant
Sure, here's a VBA code that will meet your requirements:
vba