Get Data from last 3 cells with values in 1 column

MrDB4Excel

Active Member
Joined
Jan 29, 2004
Messages
348
Office Version
  1. 2013
Platform
  1. Windows
See attached Excel Mini Sheet which contains the following:
When an action concludes then I copy the 3 values that represent the concluded action, in this case, in column "C", rows 16, 17, & 18, and then paste that into column "C", rows 19, 20, & 21.
Presently, as you view this sheet, you see that the corresponding row values in column "F" do not show correctly because new values have not yet been placed in column "C", rows 19, 20, & 21.
What I would like to do is have the values in row 2, columns "H", "I", & "J" be dynamic such that when new data is entered in column "C" that is relevant to the action beginning anew that these values in H2, I2, & J2 update to the next level; in this case, they would update to 6a, 6b, & 6c. As you can see, the formulas in H3, I3, & J3 would auto-update to new values.
Is this possible with only formula and not any VBA?
Any help is much appreciated.


Previous-Current.xlsx
ABCDEFGHIJ
1Column CData From Column C#a of PCD Action Beginning Date, or Previous#b of PCD Current Day, Shows Relevant to =TODAY()#c of PCD Duration
25a5b5c
3#PCDAction 1NumberValueMay/24/2021Jun/15/202122 Days
41aPreviousJun/09/20201aJun/09/2020
51bCurrentAug/28/20201bAug/28/2020When an action concludes then I copy the 3 values that represent the concluded action, in this case, in column "C", rows 16, 17, & 18, and then paste that into column "C", rows 19, 20, & 21. Presently, as you view this sheet, you see that the corresponding row values in column "F" do not show correctly because new values have not yet been placed in column "C", rows 19, 20, & 21. What I would like to do is have the values in row 2, columns "H", "I", & "J" be dynamic such that when new data is entered in column "C" that is relevant to the action beginning anew that these values in H2, I2, & J2 update to the next level; in this case, they would update to 6a, 6b, & 6c. As you can see, the formulas in H3, I3, & J3 would auto-update to new values. Is this possible with only formula and not any VBA?
61cDuration80 Days1c80 Days
72aPreviousAug/28/20202aAug/28/2020
82bCurrentNov/19/20202bNov/19/2020
92cDuration83 Days2c83 Days
103aPreviousJan/25/20213aJan/25/2021
113bCurrentApr/13/20213bApr/13/2021
123cDuration78 Days3c78 Days
134aPreviousApr/13/20214aApr/13/2021
144bCurrentMay/24/20214bMay/24/2021
154cDuration41 Days4c41 Days
165aPreviousMay/24/20215aMay/24/2021
175bCurrentJun/15/20215bJun/15/2021
185cDuration22 Days5c22 Days
196aPrevious6aJan/00/1900
206bCurrent6bJan/00/1900
216cDuration0 Days6c0 Days
227aPrevious7a
237bCurrent7b
247cDuration0 Days7c
Test Example
Cell Formulas
RangeFormula
H3H3=XLOOKUP(H2,E3:E23,F3:F23,0)
I3I3=XLOOKUP(I2,E4:E24,F4:F24,0)
J3J3=XLOOKUP(J2,E5:E25,F5:F25,0)
C6,C24,C21,C18,C15,C12,C9C6=SUM(C5-C4)&" Days"
C17C17=TODAY()
F4:F21F4=VLOOKUP(E4,PCD,3,TRUE)
Named Ranges
NameRefers ToCells
'Test Example'!PCD='Test Example'!$A$3:$C$21F4:F21
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I'm not following, but I am also confused as your profile says Excel 2013 but your mini-sheet is using XLOOKUP, only available in Microsoft 365. So, apart from clarifying your question, does your profile need updating?
 
Upvote 0
Yes, I am sure it is confusing, but I assure you XLOOKUP works in my 2013 Excel.
My profile is correct.
Perhaps because of an addin, but I have used it for quite some time. I seem to recall adding an addin some time ago.
So take it from there, XLOOKUP is alive and well in my 2013 Excel.
So what is it you are not following? I was certain my explanation was sufficient. What else is needed?
The key notion here is that I copy cell content from, in this example, C16, C17, & C18. Then paste that content into C19, C20, & C21. This then populates or rather fulfills the requirements of the formulas that exist in F19, F20, & F21.
What needs to happen is the 3 cells H2, I2, & J2 need to dynamically update to the content shown in E19, E20, & E21 as a result of new data coming into F19, F20, & F21.
 
Upvote 0
Try
H2: =LOOKUP("Z",F4:F24,E2:E22)
I2: =LOOKUP("Z",F4:F24,E3:E23)
J2: =LOOKUP("Z",F4:F24,E4:E24)

XLOOKUP works in my 2013 Excel.

Perhaps because of an addin,
If that is the case you will need to be careful of any existing XLOOKUP formulas if you ever change to Microsoft 365.
 
Upvote 0
Try
H2: =LOOKUP("Z",F4:F24,E2:E22)
I2: =LOOKUP("Z",F4:F24,E3:E23)
J2: =LOOKUP("Z",F4:F24,E4:E24)


If that is the case you will need to be careful of any existing XLOOKUP formulas if you ever change to Microsoft 365.
Beautiful, works fantastic, thank you so much.
And as a final note, I have no worries about having issues with 365 because I am fairly certain at my age that I will retain 2013 Excel for years to come.
There exists a remote possibility if I ever acquire a newer PC that I would more than likely end up with 2019 Excel but never will I pay monthly for a 365 subscription.
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

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