forumla

VbaHell

Well-known Member
Joined
Jan 30, 2011
Messages
1,220
Hello all

I hope you can help on this one

I want to work out what the cycle dates should be but not to include a Sat or Sun in the dates

A1 cell value will be a date
B1 cell value wll be the frequency per year
C1,D1,E1 etc would be the dates

Example

"A1" = 9/1/2018
"B1" = 1
"C1" = 9/1/2018

"A1" = 9/1/2018
"B1" = 12
"C1" = 9/1/2018
"D1" = 9/2/2018
"E1" = 9/3/2018
"F1" = 9/4/2-18
"G1" = 9/5/2018
"H1" = 11/6/2018 (This is because the 9th falls on the Saturday so the next availabe week day date is the 11th)

I am looking for some VBA code that will automate this and populate all the cells once after "A1" and "B1" values are entered. Maximum frequency is 52 (Weeks)

Any help would be great please
 
I agree but I have to try and equally space out the date over the 12 month period which really complicates this
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
A​
[/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][td="bgcolor:#C0C0C0"]
D​
[/td][td="bgcolor:#C0C0C0"]
E​
[/td][td="bgcolor:#C0C0C0"]
F​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
2​
[/td][td]
Mon 01 Jan 2018​
[/td][td]
4​
[/td][td="bgcolor:#E5E5E5"]
Mon 01 Jan 2018​
[/td][td="bgcolor:#E5E5E5"]
Mon 02 Apr 2018​
[/td][td="bgcolor:#E5E5E5"]
Mon 02 Jul 2018​
[/td][td="bgcolor:#E5E5E5"]
Tue 02 Oct 2018​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
3​
[/td][td][/td][td][/td][td][/td][td]
91​
[/td][td]
91​
[/td][td]
92​
[/td][/tr]
[/table]



Those look evenly spaced to me.
 
Upvote 0
I am very sorry you are correct

Thanks for supporting me on this as you will my me look like a superstar in front of my boss

Cheers
 
Upvote 0
Well, go us!

You're welcome.

BTW, a formula would do equally well.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top