change date cell automatically if number in inventory is decreasing

EMORIN

New Member
Joined
Jun 16, 2017
Messages
8
Im new with excel and i was wondering if there is a way to make the date change automatically for today's date if i decreased the number of item in my inventory.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Sure that is possible but we need a lot more details before we can provide some help.

How are the inventory numbers decreasing. By a formula change or manually by changing a range value.
 
Upvote 0
Inventory List 2017-06-19

Inventory ID color "Quantity in Stock" Date de mise en inventaire Quantity of days in stock

*HP 107 Gloss black 7 2017-04-04 76 Days
*HP 108 Gloss black 5 2017-04-04 76 Days

This is the basis of what i did. The worker are going to change the number of (quantity in stock) manually.
I put a formulla in the ( quantity of days in stock ) (=INT((TODAY()-E3)) & " Days" ) so i can know automatically how much has passed since last time we used some.
 
Upvote 0
AF1QipPDxRqtFEArGW-PRNogSeQjcXUPMmktlPj1gZ6h
https://photos.google.com/photo/AF1QipPDxRqtFEArGW-PRNogSeQjcXUPMmktlPj1gZ6h
 
Upvote 0
I would like to help you but I said in my previous post I needed a lot more details.

Your original post said:
if there is a way to make the date change automatically for today's date if i decreased the number of item in my inventory.


Two major questions:

What cell is going to be changed Manually?
And in what cell do you want todays date entered into?

Do you not agree this is something we would need to know. And do you agree you have not given those details. And I never click on links. So posting links here to show something does not help me.

And are you willing to use a Vba solution?
 
Upvote 0
the cell that is going to change manually is (d3) (quantity in stock) and the cell that need to get todays date will be (e3)(date de mise en inventaire)

And sure if it can help using vba solution i will learn about it and start using it.
 
Upvote 0
Try this:

This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D3")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Range("E3").Value = Date
End If
End Sub
 
Upvote 0
The above script assumes you will only be changing the value in "D3" like you said. If you plan to change the values in other rows in column "D" and want a date entered in column "E" then I would need to modify the script.
 
Upvote 0
i check how vba work and i put th code like you told me so its working for "D3". But yes i would like to do for all of the other row in column "D" and want a date entered in column "E".
And sorry if i was late to respond it is my first time playing with vba so i was checking some thing here and there.
 
Upvote 0
Try this:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D:D")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Target.Offset(, 1) = Date
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,920
Members
448,533
Latest member
thietbibeboiwasaco

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