Stop forecast formula

Erkjerk

New Member
Joined
Sep 24, 2017
Messages
36
Hello,

Just seeing if I can get a little help. So I have a forecast formula =C2/DAY(TODAY())*31 The problem is it doesn't stop at the end of the month at the 31st, it will just keep calculating so the forecast will show some ridiculous number the day after the 31st. I hope this makes sense.
 
The below will correct the month issue:
Book1
CDEF
2
30131
40228
5331
6430
7531
8630
9731
10831
11930
121031
131130
141231
Sheet1
Cell Formulas
RangeFormula
C3C3=C1/DAY(TODAY())*(VLOOKUP(MONTH(TODAY()),$E$3:$F$14,2,0))
C4C4=C2/DAY(TODAY())*(LOOKUP(MONTH(TODAY()),{1,2,3,4,5,6,7,8,9,10,11,12},{31,28,31,30,31,30,31,31,30,31,30,31}))
F4F4=DAYS(EOMONTH(DATEVALUE("01/02/"&YEAR(TODAY())),0),DATEVALUE("01/02/"&YEAR(TODAY())))+1


There two ways.
1)The VLOOKUP will require a table of month numbers and days of the month to be located somewhere in the workbook(February is a calcuation as some years will be 29 days, the formula will do this automatically.

2) The Lookup is self contained as the look up value is month number today and this will bring back the number of days. However, you will have to manually check February every to see if the days are correct.
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Awesome, thank you. I will use the vlookup. I am assuming I would have to change the formula though because I make a new sheet at the bottom for each separate month, I don't overwrite the current sheet. So at the bottom of the excel workbook, first tab is Jan 2nd tab is Feb, 3rd is Mar, etc. Thank you.
 
Upvote 0
No really, you can put the months on a separate sheet to the months and then reference the VLookup to that sheet.
 
Upvote 0
Just one more question lol. Is there a reason it is pulling from E3 and F14 rather then E3 and F3 for January?
 
Upvote 0
With Vookup, you need to specify the lookup value(month today, which will be 1), the range where the data is held(E3:F14),which column, within the range, where the data is to be returned, in this case column 2, finally whether want an exact or approximate match, in this case exact.

Have a look at this Video, minute 49, this will explain how VLOOKUP works
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,930
Members
449,094
Latest member
teemeren

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