Domithious
New Member
- Joined
- Feb 22, 2022
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
Hello everyone.
I have a spreadsheet in which i would like to record cases, in a table, and track the progress of cases from Open to Close. The spec is for each update to be recorded in a new row (rather than have one row per case).
There will be some basic information recorded for each case, then updates and an 'Update Date'. What i am trying to achieve is to autofill the basic information if an update is made to an existing case. My VBA skill are very lacking, I've tried with xlookup, but this doesn't work if a new case in entered. I've searched for posts which would help, but nothing quite fits what I'm trying to do.
On the example below the Case ID is in column A, If i type an existing case ID into a new line i would like to copy and paste columns B, to F automatically and then manually type in Column G. If the 'Case ID' is new "Date Created" is populated with today's date.
I'm not sure if this is possible. Most of the other posts I've read copy data to a new Worksheet, rather than in the same table.
I have managed to populate 'Update Date' when an Update is made.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 7 And Target.Row > 1 And IsEmpty(Range("H" & Target.Row)) Then
Range("H" & Target.Row) = Date
End If
End Sub
Many thanks in advance for any help.
I have a spreadsheet in which i would like to record cases, in a table, and track the progress of cases from Open to Close. The spec is for each update to be recorded in a new row (rather than have one row per case).
There will be some basic information recorded for each case, then updates and an 'Update Date'. What i am trying to achieve is to autofill the basic information if an update is made to an existing case. My VBA skill are very lacking, I've tried with xlookup, but this doesn't work if a new case in entered. I've searched for posts which would help, but nothing quite fits what I'm trying to do.
On the example below the Case ID is in column A, If i type an existing case ID into a new line i would like to copy and paste columns B, to F automatically and then manually type in Column G. If the 'Case ID' is new "Date Created" is populated with today's date.
I'm not sure if this is possible. Most of the other posts I've read copy data to a new Worksheet, rather than in the same table.
I have managed to populate 'Update Date' when an Update is made.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 7 And Target.Row > 1 And IsEmpty(Range("H" & Target.Row)) Then
Range("H" & Target.Row) = Date
End If
End Sub
Case ID | Date Created | Year | Month | Location | Status | Update | Update Date |
Case1 | 22/02/2022 | 2022 | Feb | London | Active | Open | 22/02/2022 |
Case1 | 22/02/2022 | 2022 | Feb | London | Active | Progress | 27/02/2022 |
Case1 | 22/02/2022 | 2022 | Feb | London | Active | More Progress | 03/03/2022 |
Case2 | 01/03/2022 | 2022 | Mar | Manchester | Active | Open | 01/03/2022 |
Case2 | 01/03/2022 | 2022 | Mar | Manchester | Active | Progress | 08/03/2022 |
Case3 | [Today's Date] | New Data | New Data | New Data | New Data | New Data | [Today's Date] |
Case2 | Copy+Paste | Copy+Paste | Copy+Paste | Copy+Paste | Copy+Paste | More Progress | [Today's Date] |
Many thanks in advance for any help.