Its not rly an answer, but i made code with Macro recored, and it works job for me. If someone have idea how to make this code simpler, im glad to hear it. This thing rly needs an optimization.
Sub Macro6()
'call macro8 to prevent any calculations on sheet "ReadyTG" and to clear old
values
Call Macro8
'finding last row in sheet "Blanko List"
Dim lRow As Long, sht As Worksheet
Set sht = Worksheets("Blanko List")
lRow = sht.Range("A2").CurrentRegion.Rows.Count
'Macro recored while doing option from Data tab > Text To Columns, to separate
'value from column A
'into 2 part, value before "-" and after "-"
sht.Range("A2", sht.Range("A2" & lRow)).Select
Selection.TextToColumns Destination:=Range("G2"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="-", FieldInfo:=Array(Array(1, 1), Array(2, 1)),
TrailingMinusNumbers:=True
'Advance fileter to remove duplicates from column "G"
'so that Hlookup function can do its job
sht.Range("G2", sht.Range("G2" & lRow)).Select
sht.Range("G2", sht.Range("G2" & lRow)).AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range("I2" _
), Unique:=True
'There is a problem in range or something with AdvanceFilter, it returns 2 values of same Product name in first 2 rows
Columns("I:I").Select
ActiveSheet.Range("$I$2:$I$58").Removeduplicates Columns:=1, Header:=xlNo
End Sub
'-----------------------------------------------------------------------------
Sub Macro7()
'Return name and serial number in columns A and B from sheet "Blanko List"
' and runs array forumula to get first and last number of ID sequince
'also it autofill rows with funcitons up to 60 rows, because i don t know the
last row
Range("A2").Select
ActiveCell.FormulaR1C1 = _
"=IFNA(VLOOKUP(RC[1]&""*"",'Blanko List'!C:C[1],2,FALSE),"""")"
Range("B2").Select
ActiveCell.FormulaR1C1 = _
"=IFNA(HLOOKUP(R1C2,'Blanko List'!C[7],ROW(RC),FALSE),"""")"
Range("C2").Select
Selection.FormulaArray = _
"=MIN(IF('Blanko List'!C[4]=RC[-1],'Blanko List'!C[5]))"
Range("D2").Select
Selection.FormulaArray = "=MAX(('Blanko List'!C[3]=RC[-2])*'Blanko List'!C[4])"
Range("A2:D2").Select
Selection.AutoFill Destination:=Range("A2:D59"), Type:=xlFillDefault
Range("A2:D59").Select
End Sub
'-------------------------------------------------------
Sub Macro8()
'clears all existing formulas and values in target sheet for better performance
'calculating time before this 3 minutes
ThisWorkbook.Worksheets("ReadyTG").Select
Rows("2:160").Select
Selection.Delete Shift:=xlUp
ThisWorkbook.Worksheets("Blanko List").Select
End Sub
VBA
that's going to be more efficient at calculating a min/max over a column than the predefined function built into Excel. TBH, that really applies to any of the built in Excel functions. – FreeMan