Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
292 views
in Technique[技术] by (71.8m points)

How to find max and min in an alphanumeric data array in Excel?

I have the following kind of data

A1          B1              C1              D1
II Cm2 447  I Phy Hn 60     II Cm2 457      I Phy Hn 70
II Cm2 448  I Phy Hn 61     II Cm2 458      I Phy Hn 71
II Cm2 449  I Phy Hn 62     II Cm2 459      I Phy Hn 72
II Cm2 450  I Phy Hn 63     II Cm2 460      I Phy Hn 73
II Cm2 451  I Phy Hn 64     II Cm2 461      I Phy Hn 74
II Cm2 452  I Phy Hn 65     II Cm2 462      I Phy Hn 75
II Cm2 453  I Phy Hn 66     II Cm2 463      I PHY ml 76
II Cm2 454  I Phy Hn 67     II Cm2 464      I PHY ml 77
II Cm2 455  I Phy Hn 68     II Cm2 465      I PHY ml 78
II Cm2 456  I Phy Hn 69     II Cm2 466      I PHY ml 79

Need to find Minimum and Maximum corresponding to 'II Cm2', 'I Phy Hn' and 'I PHY ml'

Please Help.

The solution I am looking at

Grid           Min      Max
II Cm2         447      466
I Phy Hn        60       75
I Phy ml        76       79

EDIT: I have tried several options available over internet, using VLOOKUP, RIGHT, INDEX,... But none gives me intended answer. I would prefer a solution without using helper columns. If need to use helper columns, please suggest a solution without requiring modification of my cols A:D.

For Min I have a solution MIN(VLOOKUP("II Cm2",$AE$4:$AF$171,2,0), but it requires a helper column of extracted numbers from a single column of my original data.

Solutions using macro/script also welcome.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you need to extract only Min/Max number from range, please use this formula in cell G2 and drag it to the bottom of values you entered in range F2:F5. =MIN(IF(ISNUMBER(SUBSTITUTE($A$2:$D$500,$F2,"")+0),SUBSTITUTE($A$2:$D$500,$F2,"")+0)) you must enter it using CTRL+SHIFT+ENTER combination since it it array formula. For Max just replace Min in formula.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...