Formula to bring Last Values of the multiple columns

Daiwik

New Member
Joined
Jan 12, 2016
Messages
15
Hi,

I am looking for a suitable trick to get last values of the multiple columns, as shown in the table below.
I am using a following formula (which is just half being a trial) which is working fine but it would be too lengthy. Just want to get an appropriate one. Thanks you!

=IF(B30<>"",B30,IF(B29<>"",B29,IF(B28<>"",B28,IF(B27<>"",B27,IF(B26<>"",B26,IF(B25<>"",B25,IF(B24<>"",B24,IF(B23<>"",B23,IF(B22<>"",B22,IF(B21<>"",B21,""))))))))))

[TABLE="width: 758"]
<colgroup><col><col><col span="9"></colgroup><tbody>[TR]
[TD]Date[/TD]
[TD]List 1[/TD]
[TD]List 2[/TD]
[TD]List 3[/TD]
[TD]List 4[/TD]
[TD]List 5[/TD]
[TD]List 6[/TD]
[TD]List 7[/TD]
[TD]List 8[/TD]
[TD]List 9[/TD]
[TD]List 10[/TD]
[/TR]
[TR]
[TD]01-02-2016[/TD]
[TD]45[/TD]
[TD]57[/TD]
[TD]33[/TD]
[TD]48[/TD]
[TD]37[/TD]
[TD]61[/TD]
[TD]49[/TD]
[TD]46[/TD]
[TD]38[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]02-02-2016[/TD]
[TD]44[/TD]
[TD]57[/TD]
[TD]35[/TD]
[TD]44[/TD]
[TD]45[/TD]
[TD]55[/TD]
[TD]30[/TD]
[TD]56[/TD]
[TD]57[/TD]
[TD]47[/TD]
[/TR]
[TR]
[TD]03-02-2016[/TD]
[TD]36[/TD]
[TD]44[/TD]
[TD]55[/TD]
[TD]34[/TD]
[TD]62[/TD]
[TD]31[/TD]
[TD]52[/TD]
[TD]60[/TD]
[TD]30[/TD]
[TD]44[/TD]
[/TR]
[TR]
[TD]04-02-2016[/TD]
[TD]44[/TD]
[TD]37[/TD]
[TD]61[/TD]
[TD]32[/TD]
[TD]61[/TD]
[TD]45[/TD]
[TD]35[/TD]
[TD]43[/TD]
[TD]46[/TD]
[TD]52[/TD]
[/TR]
[TR]
[TD]05-02-2016[/TD]
[TD]44[/TD]
[TD]37[/TD]
[TD]61[/TD]
[TD]32[/TD]
[TD]61[/TD]
[TD]45[/TD]
[TD]35[/TD]
[TD]43[/TD]
[TD]46[/TD]
[TD]52[/TD]
[/TR]
[TR]
[TD]06-02-2016[/TD]
[TD]34[/TD]
[TD]48[/TD]
[TD]47[/TD]
[TD]62[/TD]
[TD]40[/TD]
[TD]33[/TD]
[TD]62[/TD]
[TD]58[/TD]
[TD]51[/TD]
[TD]31[/TD]
[/TR]
[TR]
[TD]07-02-2016[/TD]
[TD]23[/TD]
[TD]31[/TD]
[TD]57[/TD]
[TD]37[/TD]
[TD]49[/TD]
[TD]39[/TD]
[TD]59[/TD]
[TD]30[/TD]
[TD]31[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]08-02-2016[/TD]
[TD]43[/TD]
[TD]31[/TD]
[TD]50[/TD]
[TD]58[/TD]
[TD]46[/TD]
[TD]30[/TD]
[TD]35[/TD]
[TD]45[/TD]
[TD]48[/TD]
[TD]54[/TD]
[/TR]
[TR]
[TD]09-02-2016[/TD]
[TD]22[/TD]
[TD]39[/TD]
[TD]44[/TD]
[TD]45[/TD]
[TD]41[/TD]
[TD]33[/TD]
[TD]62[/TD]
[TD]33[/TD]
[TD]60[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]10-02-2016[/TD]
[TD]29[/TD]
[TD]49[/TD]
[TD]35[/TD]
[TD]58[/TD]
[TD]40[/TD]
[TD]35[/TD]
[TD]57[/TD]
[TD]31[/TD]
[TD]36[/TD]
[TD]37[/TD]
[/TR]
[TR]
[TD]11-02-2016[/TD]
[TD]43[/TD]
[TD]52[/TD]
[TD]61[/TD]
[TD]57[/TD]
[TD]61[/TD]
[TD]40[/TD]
[TD]46[/TD]
[TD]38[/TD]
[TD]34[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]12-02-2016[/TD]
[TD]42[/TD]
[TD]50[/TD]
[TD]62[/TD]
[TD]56[/TD]
[TD]58[/TD]
[TD]50[/TD]
[TD]50[/TD]
[TD]57[/TD]
[TD]46[/TD]
[TD]32[/TD]
[/TR]
[TR]
[TD]13-02-2016[/TD]
[TD]29[/TD]
[TD]36[/TD]
[TD]39[/TD]
[TD]49[/TD]
[TD]58[/TD]
[TD]41[/TD]
[TD]34[/TD]
[TD]46[/TD]
[TD]45[/TD]
[TD]44[/TD]
[/TR]
[TR]
[TD]14-02-2016[/TD]
[TD]38[/TD]
[TD]41[/TD]
[TD]31[/TD]
[TD]33[/TD]
[TD]34[/TD]
[TD]35[/TD]
[TD]35[/TD]
[TD]30[/TD]
[TD]41[/TD]
[TD]58[/TD]
[/TR]
[TR]
[TD]15-02-2016[/TD]
[TD]45[/TD]
[TD]54[/TD]
[TD]47[/TD]
[TD]35[/TD]
[TD]42[/TD]
[TD]43[/TD]
[TD]61[/TD]
[TD]45[/TD]
[TD]60[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]16-02-2016[/TD]
[TD]50[/TD]
[TD]43[/TD]
[TD]58[/TD]
[TD]35[/TD]
[TD]32[/TD]
[TD]50[/TD]
[TD]45[/TD]
[TD]51[/TD]
[TD]58[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]17-02-2016[/TD]
[TD]30[/TD]
[TD]56[/TD]
[TD]33[/TD]
[TD]55[/TD]
[TD]49[/TD]
[TD]49[/TD]
[TD]36[/TD]
[TD]34[/TD]
[TD]53[/TD]
[TD]41[/TD]
[/TR]
[TR]
[TD]18-02-2016[/TD]
[TD]33[/TD]
[TD]35[/TD]
[TD]49[/TD]
[TD]62[/TD]
[TD]34[/TD]
[TD]60[/TD]
[TD]41[/TD]
[TD]59[/TD]
[TD]58[/TD]
[TD]57[/TD]
[/TR]
[TR]
[TD]19-02-2016[/TD]
[TD]24[/TD]
[TD]31[/TD]
[TD]60[/TD]
[TD]52[/TD]
[TD]43[/TD]
[TD]49[/TD]
[TD]33[/TD]
[TD]42[/TD]
[TD]60[/TD]
[TD]59[/TD]
[/TR]
[TR]
[TD]20-02-2016[/TD]
[TD]39[/TD]
[TD]34[/TD]
[TD]37[/TD]
[TD]38[/TD]
[TD]38[/TD]
[TD]43[/TD]
[TD]54[/TD]
[TD]59[/TD]
[TD]51[/TD]
[TD]58[/TD]
[/TR]
[TR]
[TD]21-02-2016[/TD]
[TD]45[/TD]
[TD]33[/TD]
[TD]44[/TD]
[TD]48[/TD]
[TD]51[/TD]
[TD]32[/TD]
[TD]48[/TD]
[TD]52[/TD]
[TD]59[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]22-02-2016[/TD]
[TD]33[/TD]
[TD]47[/TD]
[TD]52[/TD]
[TD]37[/TD]
[TD] [/TD]
[TD]59[/TD]
[TD]48[/TD]
[TD]34[/TD]
[TD]47[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]23-02-2016[/TD]
[TD]31[/TD]
[TD]45[/TD]
[TD]53[/TD]
[TD]59[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]34[/TD]
[TD]36[/TD]
[TD]48[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]24-02-2016[/TD]
[TD]49[/TD]
[TD]51[/TD]
[TD]54[/TD]
[TD]40[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]60[/TD]
[TD] [/TD]
[TD]31[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]25-02-2016[/TD]
[TD]30[/TD]
[TD]50[/TD]
[TD] [/TD]
[TD]53[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]57[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]26-02-2016[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]42[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]27-02-2016[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]28-02-2016[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]29-02-2016[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Last Figure.[/TD]
[TD]30[/TD]
[TD]50[/TD]
[TD]54[/TD]
[TD]42[/TD]
[TD]51[/TD]
[TD]59[/TD]
[TD]60[/TD]
[TD]36[/TD]
[TD]57[/TD]
[TD]40[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi BarryL,

just want to know why did you chose MAX formula with +1, What's the concept behind it? Thanks in advance.
 
Upvote 0
Here is a macro to do it. I assume you want last figure at the end of your date column. Set up your sheet like the first screenshot, run the macro. Second Screenshot shows the results.

Set up Sheet:

Excel 2003
ABCDEFGHIJK
1DateList 1List 2List 3List 4List 5List 6List 7List 8List 9List 10
21/2/201645573348376149463850
32/2/201644573544455530565747
43/2/201636445534623152603044
54/2/201644376132614535434652
65/2/201644376132614535434652
76/2/201634484762403362585131
87/2/201623315737493959303140
98/2/201643315058463035454854
109/2/201622394445413362336060
1110/2/201629493558403557313637
1211/2/201643526157614046383440
1312/2/201642506256585050574632
1413-02-201629363949584134464544
1514-02-201638413133343535304158
1615-02-201645544735424361456040
1716-02-201650435835325045515840
1817-02-201630563355494936345341
1918-02-201633354962346041595857
2019-02-201624316052434933426059
2120-02-201639343738384354595158
2221-02-201645334448513248525940
2322-02-20163347523759483447
2423-02-201631455359343648
2524-02-2016495154406031
2625-02-201630505357
2726-02-201642
2827-02-2016
2928-02-2016
3029-02-2016
Sheet1
<p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet1</p><br /><br />

Macro:
Code:
Sub Get_Last_Values_Across_Columns()
Dim i As Long, c As Long
Sheets("Sheet1").Range("A65536").End(xlUp).Offset(1, 0).Value = "Last Figure"
lastColumn = Range("B1").End(xlToRight).Column
For c = 2 To lastColumn
lastRow = Cells(2, c).End(xlDown).Row
i = Cells(1, 1).End(xlDown).Row
Cells(i, c).Value = Cells(lastRow, c).Value
Next c
End Sub

If using excel 2007 or greater, change the Sheets("Sheet1").Range("A65536") to Sheets("Sheet1").Range("A1048576")

Results of running macro:

Excel 2003
ABCDEFGHIJK
1DateList 1List 2List 3List 4List 5List 6List 7List 8List 9List 10
21/2/201645573348376149463850
32/2/201644573544455530565747
43/2/201636445534623152603044
54/2/201644376132614535434652
65/2/201644376132614535434652
76/2/201634484762403362585131
87/2/201623315737493959303140
98/2/201643315058463035454854
109/2/201622394445413362336060
1110/2/201629493558403557313637
1211/2/201643526157614046383440
1312/2/201642506256585050574632
1413-02-201629363949584134464544
1514-02-201638413133343535304158
1615-02-201645544735424361456040
1716-02-201650435835325045515840
1817-02-201630563355494936345341
1918-02-201633354962346041595857
2019-02-201624316052434933426059
2120-02-201639343738384354595158
2221-02-201645334448513248525940
2322-02-20163347523759483447
2423-02-201631455359343648
2524-02-2016495154406031
2625-02-201630505357
2726-02-201642
2827-02-2016
2928-02-2016
3029-02-2016
31Last Figure30505442515960365740
Sheet1
<p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet1</p><br /><br />
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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