Need help for Date Formula

firstWeMeet

Board Regular
Joined
Feb 8, 2011
Messages
200
Hi, My date formula is not working, anyone has a suggested formula for this setup?
this is my setup
G3=2011 (year)
J3=1 (representing the month which is January)
C12=IF(OR(G3="",J3=""),"No Year and Date",DATE($G$3,$J$3,1))
C12 will automatic appear the month.
M3=1 (representing the start of Day)
C14=INDEX({"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"},1+MOD($M$3+1-2,7))
C14 and below will automatic for a Day (like Sunday, Monday, and the rest Day)

Now! the problem is for my E14 and below is not responding for a date such as 1 to 31, my formula for E14 and below is this:
=IF(MONTH($C$12)<>MONTH($C$12-(WEEKDAY($C$12,1)-($M$3-1))-IF((WEEKDAY($C$12,1)-($M$3-1))<=0,7,0)+(ROW(E14)-ROW($E$14))*7+(COLUMN(E14)-COLUMN($E$14)+1)),"",$E$14-(WEEKDAY($E$14,1)-($M$3-1))-IF((WEEKDAY($C$12,1)-($M$3-1))<=0,7,0)+(ROW(E14)-ROW($E$14))*7+(COLUMN(E14)-COLUMN($E$14)+1))
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Sorry, it's not clear enough for.

Probably is not what you want, but to get date from those values something like this could be done.
Excel Workbook
CDEFGHIJKLM
3201111
4
5
6
7
8
9
10
11
1201/01/2011
13
14Sunday01/01/2011
...
Cell Formulas
RangeFormula
C12=IF(OR(G3="",J3=""),"No Year and Date",DATE($G$3,$J$3,1))
C14=INDEX({"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"},1+MOD($M$3+1-2,7))
E14=DATE(G3,MONTH(C12),DAY(C12))

Hope this helps, if not please explain with details what you need as output
and which values are the input,

Regards.
 
Upvote 0
the 1 for january 2011 is located at Saturday, since the C14,15,16,17 and soon has a formula that set the Day (Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday) and hope to find a formula that will auto set the Date that not included the Year and month just the date, (1 to 31).
 
Upvote 0

Forum statistics

Threads
1,224,617
Messages
6,179,915
Members
452,949
Latest member
beartooth91

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