Find the min serial number (for a date & time) in a column in a Table

SaraT

New Member
Joined
Jul 29, 2011
Messages
2
Ok, new to this. So please bare with me...

I have this range (column #2 of table1):

Worksheets("Sheet1").ListObjects("Table1").ListColumns(2).DataBodyRange

Within this range are dates and times which I know are actually serial numbers:

<table border="0" cellpadding="0" cellspacing="0" width="372"><col style="mso-width-source:userset;mso-width-alt:13604;width:279pt" width="372"> <tbody><tr style="height:15.0pt" height="20" valign="bottom"> <td style="height:15.0pt;width:279pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border-top:none;border-right:none; border-bottom:1.5pt solid white;border-left:.5pt solid white;background:#4F81BD; mso-pattern:#4F81BD none" height="20" width="372">Time
</td> </tr> <tr style="height:15.0pt" height="20" valign="bottom"> <td class="xl65" style="height:15.0pt;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border-top:none;border-right:none; border-bottom:.5pt solid white;border-left:.5pt solid white;background:#B8CCE4; mso-pattern:#B8CCE4 none" align="right" height="20">40752.6622800926</td> </tr> <tr style="height:15.0pt" height="20" valign="bottom"> <td class="xl65" style="height:15.0pt;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border-top:none;border-right:none; border-bottom:.5pt solid white;border-left:.5pt solid white;background:#DBE5F1; mso-pattern:#DBE5F1 none" align="right" height="20">40753.6775578704</td> </tr> <tr style="height:15.0pt" height="20" valign="bottom"> <td class="xl65" style="height:15.0pt;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border-top:none;border-right:none; border-bottom:.5pt solid white;border-left:.5pt solid white;background:#B8CCE4; mso-pattern:#B8CCE4 none" align="right" height="20">40754.6775578704</td> </tr> <tr style="height:15.0pt" height="20" valign="bottom"> <td class="xl65" style="height:15.0pt;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border-top:none;border-right:none; border-bottom:.5pt solid white;border-left:.5pt solid white;background:#DBE5F1; mso-pattern:#DBE5F1 none" align="right" height="20">40755.6775578704</td> </tr> <tr style="height:15.0pt" height="20" valign="bottom"> <td class="xl65" style="height:15.0pt;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border-top:none;border-right:none; border-bottom:.5pt solid white;border-left:.5pt solid white;background:#B8CCE4; mso-pattern:#B8CCE4 none" align="right" height="20">40756.6775578704</td> </tr> <tr style="height:15.0pt" height="20" valign="bottom"> <td class="xl65" style="height:15.0pt;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border-top:none;border-right:none; border-bottom:.5pt solid white;border-left:.5pt solid white;background:#DBE5F1; mso-pattern:#DBE5F1 none" align="right" height="20">40757.6775578704</td> </tr> <tr style="height:15.0pt" height="20" valign="bottom"> <td class="xl65" style="height:15.0pt;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border-top:none;border-right:none; border-bottom:.5pt solid white;border-left:.5pt solid white;background:#B8CCE4; mso-pattern:#B8CCE4 none" align="right" height="20">40758.6775578704</td> </tr> <tr style="height:15.0pt" height="20" valign="bottom"> <td class="xl65" style="height:15.0pt;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border-top:none;border-right:none; border-bottom:none;border-left:.5pt solid white;background:#DBE5F1; mso-pattern:#DBE5F1 none" align="right" height="20">40759.6775578704
</td> </tr> </tbody></table>
I want to select through VBA the minimum (MIN) value of this range

Thank you!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Welcome to the MrExcel board!

Not quite sure if you actually want to select the cell or just find the minimum value. See if this helps
Code:
MsgBox WorksheetFunction.Min(Worksheets("Sheet1").ListObjects("Table1").ListColumns(2).DataBodyRange)
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,351
Members
452,907
Latest member
Roland Deschain

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