Formulas based on a set value

Broo2439

New Member
Joined
Jun 25, 2018
Messages
3
Hey all
I'm sorry if this question has been asked before, but I'm trying to sort a mega spreadsheet to make something at work much easier and simplier

Basically every day, someone has to give me a number which I then add to the spread sheet.
If this number is '4' I would like the value to be saved elsewhere as 0
If its less then '4' I would like the amount its less by to be saved so -1 if its 3, -2 if its 2 etc
If the value is over '4' I would like it to say how much it is over. so a 1 if the value is 5, a 2 if the value is 6

And then I would like all of those values to be added together so I can see by how much we are over or under target.

I guess the easier way to explain it with a mock table

Value =4
25/6/18
26/6/18
27/6/18
28/6/18
29/6/18
30/6/18
1/7/18
4
3
4
1
6
2
1
=0
=-1
=0
=-3
=2
=-2
=-3

<tbody>
</tbody>

Total
-7

<tbody>
</tbody>

This will continue over many weeks, but I want the total value to stay at the top of the page, and adds up all the weeks.

I hope I've explained this well enough and someone will be able to help me out.

Thanks in advance
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Welcome to Mr Excel forum

See if this does what you need

A
B
C
D
E
F
G
H
1
Value​
4​
2
Result​
-7​
3
25/06/2018​
26/06/2018​
27/06/2018​
28/06/2018​
29/06/2018​
30/06/2018​
01/07/2018​
4
4​
3​
4​
1​
6​
2​
1​

Formula in B2
=SUMPRODUCT(--(A4:Z4<>""),A4:Z4-B1)

You can increase the range A4:Z4 as needed

Hope this helps

M.
 
Upvote 0
Hey there!
Thanks for your speedy response.
The only issue I see is the longevity of this formula
I would like to then be able to put in The A5 Line, the next week of dates.
Then the A6 line the next set of values, to be added into the top result.

Sorry for being a pain in the backside
 
Upvote 0
You should try a different way to organize your data. Or you will have to adjust the ranges every week.

M.
 
Upvote 0
Is it possible to set the formula so it only grabs values from even lines? And then set it to grab every even line value, and ignore odd line values so I can put the dates in those lines
 
Upvote 0
Is it possible to set the formula so it only grabs values from even lines? And then set it to grab every even line value, and ignore odd line values so I can put the dates in those lines

Not sure i understand what you trying to do. Try to provide an example.

M.
 
Upvote 0

Forum statistics

Threads
1,214,533
Messages
6,120,076
Members
448,943
Latest member
sharmarick

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