Hi,
I raised a previous forum entry to ask how I changed a value automatically - this can be found in the forum entry
here.
I was provided some macro code listed below, which worked, but I am now asking for some tweaks also listed below and have been advised to post here as this forum category is dedicated for this reason
** Code provided by Developer on General Forum:
Sub Change_Status()
Dim ws As Worksheet
Dim r As Long, lastrow As Long
Set ws = Worksheets("All Resourcing")
With ws
lastrow = .Cells(Rows.Count, 2).End(xlUp).Row
For r = 5 To lastrow
If Now > .Cells(r, 6) Then .Cells(r, 10) = "Expired"
Next r
End With
End Sub
** Small Tweaks requested by myself to this code are below:
1) would you be able to change the code to run automatically if there is a change to the end date (column F) to a date to or past todays date, so that the Expired status is changed to "Requested".
2) would you be able to change the code to run automatically when we enter the workbook on open, or when a change is made to the end date to be after todays date
3) Would it be possible to only set the "Expired" status if a date is located in the column F, because this code is adding Expired where I have blank lines in my workbook (because my non test entry has multiple disciplines (Linux, Windows etc) with blank lines between them)
I hope that you could change the code accordingly to help me?
If you need anything else from me, please feel free to ask.
Thanks Rob :confused: