a value in a cell

baalim

New Member
Joined
Feb 11, 2019
Messages
5
In Excel l have a cell that has a verbal value say 200. I add numbers to this value on daily badis. Example today I add 20 tomorrow I may add 35 and the other day I add 50..etc. until it reaches a total 100 added to the value, so it becomes 300 the I need it tells me done then it starts counting again from 300 until reaching 100 to become 400 telling me done and so on… Is there a formula in excel narrates and gives this result…
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Can you show an example of what it currently looks like and what you want to see.

If you are just changing the one cell VBA may be the solution:

Code:
Sub flag100()

Dim myval As Long
Dim addval As Long
Dim myint As Long
Dim myint2 As Long


myval = Range("B2").Value 'update as needed
addval = InputBox("Add value to Cell")

Range("B2").Value = addval + myval

myint = Int(myval / 100)
myint2 = Int((myval + addval) / 100)

If myint <> myint2 Then
MsgBox "Past 100"
End If

End Sub

If you keep adding values in different cells then a formula might be more suitable.
 
Last edited:
Upvote 0
Thanks Dear Friend,
- I keep adding values in different cells (not one cell e.g. B2, B3, B4, B5 and B6 only)
- I kindly need “Past 100” to be written beside the cell B2 that Past 100 written in cell C2 and on for the other.
- The total 100 should be added exactly to the value whatever it is like 220 when 100 added to it becomes 320 (not 80 to be 300) the 100 is added on daily basis not in one time.

Please see table:
B2C2
220NOT YET
320PAST 100
150NOT YET
360PAST 100
510NOT YET

<tbody>
</tbody>











:eek:

Can you show an example of what it currently looks like and what you want to see.

If you are just changing the one cell VBA may be the solution:

Code:
Sub flag100()

Dim myval As Long
Dim addval As Long
Dim myint As Long
Dim myint2 As Long


myval = Range("B2").Value 'update as needed
addval = InputBox("Add value to Cell")

Range("B2").Value = addval + myval

myint = Int(myval / 100)
myint2 = Int((myval + addval) / 100)

If myint <> myint2 Then
MsgBox "Past 100"
End If

End Sub

If you keep adding values in different cells then a formula might be more suitable.
 
Upvote 0
Thanks Dear Friend,
- I keep adding values in different cells (not one cell e.g. B2, B3, B4, B5 and B6 only)
- I kindly need “Past 100” to be written beside the cell B2 that Past 100 written in cell C2 and on for the other.
- The total 100 should be added exactly to the value whatever it is like 220 when 100 added to it becomes 320 (not 80 to be 300) the 100 is added on daily basis not in one time.

Please see table:
B2C2
220NOT YET
320PAST 100
150NOT YET
360PAST 100
510NOT YET

<tbody>
</tbody>
 
Upvote 0
=IF(B3="","",IF(INT(B2/100)<>INT(B3/100),"PAST 100","NOT YET")) in C3 copied down
 
Last edited:
Upvote 0

Forum statistics

Threads
1,203,326
Messages
6,054,744
Members
444,748
Latest member
knowak87

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