Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
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
|Pivot Table Top 10 not working.||1||35|
|Find and Replace Function not working in Excel||13||41|
|VBA question, how many data set exists in the sheet||14||53|
|Excel Formula to check both condition's and return values||2||26|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
13 Experts available now in Live!