Help with permanent dates into 2 different cells based on validated list

Ozads

New Member
Joined
Apr 19, 2022
Messages
4
Office Version
  1. 2013
Platform
  1. Windows
Hi,

firstly, thanks for everyone's posts in general in this forum, many have been really helpful for me, especially with me learning some VBA.

My question today is, for my technician job worksheet below, I would like to automatically enter the current date when a job is started (L3) and then the current date when a job is finished (P3). Both processes being based on selecting the correct value in column H3 (validated list). So, Start Date needs to populate automatically when I change the status to "IN PROGRESS" and, once the job has been made, the Delivery Date needs to populate automatically when I change the status to "COMPLETED", without changing the Start Date that was previously entered.

I can get the current date to populate when either one is selected, but can't get either a formula or VBA to hold a date that was previously entered automatically (I don't want it to change once entered). It's important for me to keep a record of how long our jobs are taking from start to finish.

If someone could help me with this I'd be really grateful. Happy to run it as VBA or as a formula.

Thanks in advance,

Adam

tech work list.jpg
 
Hi, thank you so much for your replies and apologies for the code not tagged correctly.

I like your code options way better than mine. I'm using the case statement option.

Thanks also for the extra option with the message boxes. That's made me think further and I have some uses for this so will be able to apply it too.

Cheers,

Adam
Glad I was able to help you.
Come back here to Mr. Excel next time you need additional assistance.
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Here are some more examples of how to use Case
This is a module script to put in a button.
This script looks to see what you have in Range("A1") of the sheet with the button.

VBA Code:
Sub Using_Case()
'Modified  4/20/2022  11:17:57 PM  EDT

Select Case Range("A1").Value

    Case "Yes", "No", "Maybe"
        Range("B1").Value = "Good Job"
    
    Case 1 To 10
    'If you enter any value from 1 to 10
        MsgBox "You entered  " & Range("A1").Value
        
    Case "Alpha" To "Charlie"
    'If you enter any string between Alpha to Charlie. Excel knows how to spell.
        MsgBox "You entered  " & Range("A1").Value

        Case Else
            Range("B1").Value = "Bad Job"
    
End Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,913
Members
449,093
Latest member
dbomb1414

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