=and I need some logical help

dannyok90

Board Regular
Joined
Aug 30, 2016
Messages
115
Evening all!

Im trying to create a new spread sheet and well, iv come accross my brain block..

you can see in the spreadsheet attatched. http://s000.tinyupload.com/?file_id=84408271285290770767

Im trying to write a formula that will populate the 'F' (forcast) Column with the Weekly Spend over the weeks relative to the start and end date

i know you can do this sort of thing with =weekday and i think im onto the right sort of thing but because dates are incrementing in weeks i cant think of a way for excel to know that it needs to put the weekly spend in the columns in between the star and end date if you see what i mean, sorry i know thats pretty rubbish way of explaining!!

any help would be hugely appreciated!

Thanks Guys
 
Last edited:

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Maybe something like this but its returning an error??

=IF(H3,G3,""), AND(H$1>=$D3,H$1<=E$3))
 
Upvote 0
Cracked it :)

=IFERROR((H$1>=$D3,H$1<=E$3),G3)

I don't thing that is really doing what you think it is.
IFERROR will test your formula, if it returns an error, you then specify what to do. If there is no error, it returns your formula.
In your case, this ((H$1>=$D3,H$1<=E$3) will return either TRUE or FALSE, it will not return any value. If the arguments in ((H$1>=$D3,H$1<=E$3) are value, the answer will be TRUE, if not, it will return the contents of G3

If you need to test if a date is between 2 dates (you were almost there)...
=IF(AND(H$1>=$D3,H$1<=E$3),G3,0)
 
Upvote 0
I don't thing that is really doing what you think it is.
IFERROR will test your formula, if it returns an error, you then specify what to do. If there is no error, it returns your formula.
In your case, this ((H$1>=$D3,H$1<=E$3) will return either TRUE or FALSE, it will not return any value. If the arguments in ((H$1>=$D3,H$1<=E$3) are value, the answer will be TRUE, if not, it will return the contents of G3

If you need to test if a date is between 2 dates (you were almost there)...
=IF(AND(H$1>=$D3,H$1<=E$3),G3,0)


Hi! yes my last post was a little over anticipated, i soon realised that it wasnt returning the correct values, but i did some jigging and i come up with the correct formula which (low and behold) is the same as yours haha. thanks for the guidance though!

What im finding now (i dont know if you've looked at the spreadsheet) is that the forcasted figure is populating under two dates, which technically only represents one week. if the task is 2 weeks its populating under 3 dates, if you see what im saying.. i think its possibly something to do with the >=<= but not sure. heres a link to the current xls http://s000.tinyupload.com/?file_id=02891617996003745039
 
Last edited:
Upvote 0
Sure Stuff :)

znva5h.png


2dang9k.png
 
Last edited:
Upvote 0
haha, yeah sure no problem, ive done two tables so you can see what im trying to achieve, like i said the first task duration is only 1 week but in the dates to the right its apearing over two dates when them dates only really mean one week.

another thing aswell you maybe able to shed light on, how could i be sure that the dates on the left are always on a weekending friday? :confused:


ABCDEFGHIJKLM
1Subtask
Area​
BudgetStart DateFinish DateWeeksForcast Wk Spend03/02/1704/02/1705/02/1706/02/1707/02/1708/02/17
2FFFFFF
3001Bidding Stage£33,00003/02/201710/02/20171£33,000£33,000£33,000
4002Prelims£10,00003/02/201717/02/20172£5,000£5,000£5,000£5,000
5
6

<tbody>
</tbody>

ABCDEFGHIJKLM
1SubtaskAreaBudgetStart DateFinish DateWeeksForcast Wk Spend=D3=H1+7=I1+7=J1+7=K1+7=L1+7
2FFFFFF
3001Bidding Stage£33,00003/02/2017=D3+7*F31=IFERROR(C3/F3,"")=IF(AND(H$1>=$D3,H$1<=$E3),$G3,"")=IF(AND(I$1>=$D3,I$1<=$E3),$G3,"")=IF(AND(J$1>=$D3,J$1<=$E3),$G3,"")=IF(AND(K$1>=$D3,K$1<=$E3),$G3,"")=IF(AND(L$1>=$D3,L$1<=$E3),$G3,"")=IF(AND(M$1>=$D3,M$1<=$E3),$G3,"")
4002Prelims£10,00003/02/2017=D4+7*F42=IFERROR(C4/F4,"")=IF(AND(H$1>=$D4,H$1<=$E4),$G4,"")=IF(AND(I$1>=$D4,I$1<=$E4),$G4,"")=IF(AND(J$1>=$D4,J$1<=$E4),$G4,"")=IF(AND(K$1>=$D4,K$1<=$E4),$G4,"")=IF(AND(L$1>=$D4,L$1<=$E4),$G4,"")=IF(AND(M$1>=$D4,M$1<=$E4),$G4,"")
5
6

<tbody>
</tbody>
 
Last edited:
Upvote 0
Found out why. Take your formula in F3 =IF(AND(H$1>=$D3,H$1<=$E3),$G3,"")

Your AND conditions states if it's more/less than or equal to the column date then put it in.

If you change it to
=IF(AND(H$1>=$D3,H$1<$E3),$G3,"") and drag

This will then show it in the first column H (same as the start date)

If you change it to
=IF(AND(H$1>$D3,H$1<=$E3),$G3,"") and drag

This will then show it in the second column I (same as the end date)

Also worth pointing out that the dates 03/02/17 to 10/02/17 spans 8 days i.e. Friday to Friday inclusive.

If you keep the formula as it is and just add -1 to your formula in the finish date i.e. in cell E3 put
=D3+7*F3-1
 
Upvote 0

Forum statistics

Threads
1,215,356
Messages
6,124,475
Members
449,164
Latest member
Monchichi

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