Determining latest software version

NewOrderFac33

Well-known Member
Joined
Sep 26, 2011
Messages
1,275
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
Good afternoon - just wondering if anyone has ever been asked to determine the latest version of a piece of software where the list contains 4 octet versions e.g.
Product A 1.0.2.3
Product A 1.0.3.5
Product A 1.1.0.1

In this case, the third item in the list would be returned

if the solution could also work for items with less than four octets e.g.

Product B 1.2.1
Product B 1.3
Product B 2.0

would return 2.0

Thanks
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try:

Dante Amor
ABCDE
1PRODUCTVERSIONPRODUCTLATEST VERSION
2Product A1.0.2.3Product A1.1.0.1
3Product A1.0.3.5Product B2.0
4Product A1.1.0.1
5Product B1.2.1
6Product B1.3
7Product B2.0
Hoja1
Cell Formulas
RangeFormula
E2:E3E2=INDEX($B$2:$B$7,MAX(((MAX(($A$2:$A$7=D2)* ((LEFT($B$2:$B$7,FIND(".",$B$2:$B$7))&SUBSTITUTE(MID($B$2:$B$7,FIND(".",$B$2:$B$7)+1,99),".",""))*1)))= ((LEFT($B$2:$B$7,FIND(".",$B$2:$B$7))&SUBSTITUTE(MID($B$2:$B$7,FIND(".",$B$2:$B$7)+1,99),".",""))*1))* ROW($B$2:$B$7))-ROW($B$2)+1)
Press CTRL+SHIFT+ENTER to enter array formulas.



If the formula is too long, you can try a helper column:
Dante Amor
ABCDE
1PRODUCTVERSIONAUXPRODUCTLATEST VERSION
2Product A1.0.2.31.023Product A1.1.0.1
3Product A1.0.3.51.035Product B2.0
4Product A1.1.0.11.101
5Product B1.2.11.21
6Product B1.31.3
7Product B2.02
Hoja1
Cell Formulas
RangeFormula
E2:E3E2=INDEX($B$2:$B$7,MATCH(LOOKUP(2,1/($A$2:$A$7=D2),$C$2:$C$7),$C$2:$C$7))
C2:C7C2=(LEFT(B2,FIND(".",B2))&SUBSTITUTE(MID(B2,FIND(".",B2)+1,99),".",""))*1


:)
 
Last edited:
Upvote 0
Really, sorry - I can't get this to work at all, even with the helper column :( Every cell in the array returns the same value I don't suppose there's a VBA solution that I could try, with the data laid out similar to the above.
 
Upvote 0
I could also help you with VBA but I need to see exactly how your data is in the sheet and the expected results.

As you can see in your examples and my examples the results are correct, so the data you are testing with is probably not like your initial sample.

That is why you must provide a larger and more real sample of your data.

Note XL2BB:
For the future, it would help greatly if you could give us the sample data in a form that we can copy to test with.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Really, sorry - I can't get this to work at all, even with the helper column :( Every cell in the array returns the same value I don't suppose there's a VBA solution that I could try, with the data laid out similar to the above.
Did you confirm the first formula with Ctrl-Shift + Enter and not just Enter?
 
Upvote 0
Try the following
the 000 pads the number for a length of at least 4
the -- double negative converts the text to a number

T202308a.xlsm
ABCD
1PRODUCTVERSIONVersion
2Product A1.0.2.310231.1.0.1
3Product A1.0.3.51035
4Product A1.1.0.11101
5Product B1.2.112102
6Product B1.31300
7Product B22000
8
2b
Cell Formulas
RangeFormula
D2,D5D2=INDEX(B2:B4,MATCH(MAX(C2:C4),C2:C4,0))
C2:C7C2=--LEFT(SUBSTITUTE(B2,".","")&"000",4)
 
Upvote 0
N.B. You can copy the post to a clean sheet.
click the icon below the f(x) in the header
move to your sheet, select cell A1, and paste

T202308a.xlsm
ABCDE
1PRODUCTVERSIONLatest Version
2Product A1.0.2.31023Product A1.1.0.1
3Product A1.0.3.51035
4Product A1.1.0.11101
5Product B1.2.11210Product B2
6Product B1.31300
7Product B22000
2b
Cell Formulas
RangeFormula
D2,D5D2=A2
E2,E5E2=INDEX(B2:B4,MATCH(MAX(C2:C4),C2:C4,0))
C2:C7C2=--LEFT(SUBSTITUTE(B2,".","")&"000",4)
 
Upvote 0
N.B. You can copy the post to a clean sheet.
click the icon below the f(x) in the header
move to your sheet, select cell A1, and paste

T202308a.xlsm
ABCDE
1PRODUCTVERSIONLatest Version
2Product A1.0.2.31023Product A1.1.0.1
3Product A1.0.3.51035
4Product A1.1.0.11101
5Product B1.2.11210Product B2
6Product B1.31300
7Product B22000
2b
Cell Formulas
RangeFormula
D2,D5D2=A2
E2,E5E2=INDEX(B2:B4,MATCH(MAX(C2:C4),C2:C4,0))
C2:C7C2=--LEFT(SUBSTITUTE(B2,".","")&"000",4)
 
Upvote 0
Good evening, Dave - thanks for your reply - I may be being really stupid here, but how do the formulae in column E refer to the product names in column D in order to work out the latest versions for Products A and B?
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,988
Members
449,093
Latest member
Mr Hughes

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