Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
in the second macro. The last value of date discovered in my oversimplistic macro might not be the latest date. It wouldn't be a problem if I could store each of dates in a range on the worksheet, but i can't.
Dt = WorksheetFunction.Max(myArray(0), myArray(1), myArray(2), myArray(3))
Sub FindMaxDate() Dim EIS As Range, NumSNs As Long, i As Long, Dt As Date, Dt2 As Date, Dt3 As Date NumSNs = WorksheetFunction.CountIf([LKP_SN], [V1]) Set EIS = [LKP_SN].Find(what:=[V1].Value) Dt = EIS.Offset(0, 1) 'On Error Resume Next For i = 2 To NumSNs Set EIS = [LKP_SN].Find(what:=[V1].Value, after:=EIS) Dt = EIS.Offset(0, 1) Next i [W1] = Dt End Sub
Sub demoArray1() Dim Lng As Long Dim Dt As Date Dim myArray(0 To 3) As Date myArray(0) = [D4] myArray(1) = [D5] myArray(2) = [D6] myArray(3) = [D7] Dt = WorksheetFunction.Max(myArray(0), myArray(1), myArray(2), myArray(3)) End Sub
|Create a loop to find all instances of a string||6||29|
|TT Column Arrange||10||28|
|In Excel 2007, why do I get a minus result for one cell but not the other when both cells are formatted exactly the same?||22||21|
|Why did I get the file extension .xlk when I added a plug-in in my Excel 2007 and can/should I save it as .xlsm next time?||3||19|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
20 Experts available now in Live!