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
 
Re Post #9
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?
They do not use the description from Column D.

Did the formulas work for you?
Try reviewing the formula with Excel's Formulas Evaluate Formula.
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You can hide Column C if you want.

T202308a.xlsm
ABCD
1PRODUCTVERSIONHelper ColumnLatest Version
2Product A1.0.2.310231.1.0.1
3Product A1.0.3.51035
4Product A1.1.0.11101
2b
Cell Formulas
RangeFormula
D2D2=INDEX(B2:B4,MATCH(MAX(C2:C4),C2:C4,0))
C2:C4C2=--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)
Ah - I see now - your formulae refer to the specific row ranges for each product - in your example, Product A is rows 2-4, Product B is rows 5-7. My problem is that each product may have a completely different number of rows, making it (while not impossible) a bit impractical as I'd need to know the row ranges for each product - and there are 181 of them!

My Products are in A2:A4950 (range "Versions_Names"), the versions are in B2:B4950 (range "Versions_Versions"). the versions returned by your helper column are in C2:C4950 (range "Versions_Helpers") and I have a list of unique product names in H2:H180 (range "Versions_Unique_Names").

I want to have the largest version number for each Product (from C2:C4950/"Versions_Helpers" ) returned in I2:I180. I also don't mind a VBA solution, if you can think of one!

Thank you for your help!
 
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.
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.
Good evening - I can't post live data from work, unfortunately - however:

My Products are in A2:A4950 (range "Versions_Names"), the versions are in B2:B4950 (range "Versions_Versions"). the versions returned by Dave Patton's helper column are in C2:C4950 (range "Versions_Helpers") and I have a list of unique product names in H2:H180 (range "Versions_Unique_Names").

I want to have the largest version number for each Product (from C2:C4950/"Versions_Helpers" ) returned in I2:I180.

Thank you for your help!
 
Upvote 0
Data Subtotal feature of Excel will add the formulas for the calculations by category.
You could then use a lookup formula to put the results where you want.
Put Max for the category Helper Column

T202308a.xlsm
ABC
1PRODUCTVERSIONHelper Column
2Product A1.0.2.31023
3Product A1.0.3.51035
4Product A1.1.0.11101
5Product A 01101
6Product B1.2.11210
7Product B1.31300
8Product B22000
9Product B 22000
10Grand 22000
2bb
Cell Formulas
RangeFormula
B9:C9,B5:C5B5=SUBTOTAL(4,B2:B4)
C2:C4,C6:C8C2=--LEFT(SUBSTITUTE(B2,".","")&"000",4)
B10:C10B10=SUBTOTAL(4,B2:B8)
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,958
Members
449,096
Latest member
Anshu121

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