Round the number, and look up the match correspond value

hpbaxxter

New Member
Joined
May 23, 2014
Messages
35
Hello,
I have columns with values (The yellow columns),
and I have a cell of Sum (E5)
I need a formula to round the result of H6 and look up the math in the yellow columns and insert the correspond value .
And thanks in advance.
 

Attachments

  • Screenshot 2021-05-29 234706.png
    Screenshot 2021-05-29 234706.png
    17.5 KB · Views: 4

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"
It would have helped if your posted your data with the forum's XL2BB.

Review the following and expand to address your question.

T202105a.xlsm
ABCDEFGHIJK
1
21227151156.57.73.02
3332916
46431173318
5853318
6963519
71173720
81383921
91594122
1017104323
1119114524
1221124725
1323134926
1425145127
4b
Cell Formulas
RangeFormula
G4G4=ROUND(SUM(G2:K2),0)
H4H4=CHOOSE(MATCH(G4,{1,27},1),VLOOKUP(G4,A2:B14,2,0),VLOOKUP(G4,C2:D14,2,0))
 
Upvote 0
Evaluate the suggestions and use the alternative that you prefer.
It is not necessary to name the ranges but it can make the formula easier to read.


T202105a.xlsm
ABCDEFGHIJ
1
2Data1156.57.73.02
3
4ResultsSumCorresponding Value#N/A
533.221818
6331818#N/A
7
81227155328
93329165529
106431175730
118533185931
129635196132
1311737206333
1413839216534
1515941226735
16171043236936
17191145247137
18211247257338
19231349267539
20251451277740
4b
Cell Formulas
RangeFormula
E5E5=SUM(F2:J2)
F5F5=CHOOSE(MATCH(ROUND(E5,0),{1,27,53},1),VLOOKUP(ROUND(E5,0),A8:B20,2,0),VLOOKUP(ROUND(E5,0),C8:D20,2,0),VLOOKUP(ROUND(E5,0),E8:F20,2,0))
E6E6=ROUND(SUM(F2:J2),0)
F6F6=CHOOSE(MATCH(E6,{1,27,53},1),VLOOKUP(E6,rL_1,2,0),VLOOKUP(E6,rL_2,2,0),VLOOKUP(E6,rL_3,2,0))
G6G6=AGGREGATE(14,6,J4:J6,1)
J4J4=VLOOKUP(E6,rL_1,2,0)
J5J5=VLOOKUP(E6,rL_2,2,0)
J6J6=VLOOKUP(E6,rL_3,2,0)
Named Ranges
NameRefers ToCells
rL_1='4b'!$A$8:$B$20J4, F5:F6
rL_2='4b'!$C$8:$D$20J5, F5:F6
rL_3='4b'!$E$8:$F$20J6, F5:F6
 
Upvote 0
It would have helped if your posted your data with the forum's XL2BB.

Review the following and expand to address your question.

T202105a.xlsm
ABCDEFGHIJK
1
21227151156.57.73.02
3332916
46431173318
5853318
6963519
71173720
81383921
91594122
1017104323
1119114524
1221124725
1323134926
1425145127
4b
Cell Formulas
RangeFormula
G4G4=ROUND(SUM(G2:K2),0)
H4H4=CHOOSE(MATCH(G4,{1,27},1),VLOOKUP(G4,A2:B14,2,0),VLOOKUP(G4,C2:D14,2,0))

Thanks for the reply, but you removed the values of yellow columns.
Well, I posed it here, and I hope it will be easy to help me.

example.xlsx
ABCDEFGHIJKL
1LenghtValueLenghtLenghtData
212271553281156.57.73.02
33329165529
46431175730
58533185931Sumcorrespond value
6963519613233.2218
711737206333
813839216534
915941226735
10171043236936
11191145247137
12211247257338
13231349267539
14251451277740
Sheet1
Cell Formulas
RangeFormula
H6H6=SUM(H2:M2)
 
Upvote 0
OK I will repost my suggestion.
I had moved the data lower. Your post said " I have a cell of Sum (E5)"
You did not state where the data was located.

Try the alternative that you prefer.
T202105a.xlsm
ABCDEFGHIJKL
1
21227155328Data1156.57.73.02
33329165529
46431175730ResultsSumCorresponding Value#N/A
5853318593133.221818
69635196132331818#N/A
711737206333
813839216534
915941226735
10171043236936
11191145247137
12211247257338
13231349267539
14251451277740
4b
Cell Formulas
RangeFormula
H5H5=SUM(H2:L2)
I5I5=CHOOSE(MATCH(ROUND(H5,0),{1,27,53},1),VLOOKUP(ROUND(H5,0),A2:B14,2,0),VLOOKUP(ROUND(H5,0),C2:D14,2,0),VLOOKUP(ROUND(H5,0),E2:F14,2,0))
K4K4=VLOOKUP(H6,rL_1,2,0)
K5K5=VLOOKUP(H6,rL_2,2,0)
H6H6=ROUND(SUM(H2:L2),0)
I6I6=CHOOSE(MATCH(H6,{1,27,53},1),VLOOKUP(H6,rL_1,2,0),VLOOKUP(H6,rL_2,2,0),VLOOKUP(H6,rL_3,2,0))
J6J6=AGGREGATE(14,6,K4:K6,1)
K6K6=VLOOKUP(H6,rL_3,2,0)
Named Ranges
NameRefers ToCells
rL_1='4b'!$A$2:$B$14K4, I5:I6
rL_2='4b'!$C$2:$D$14K5, I5:I6
rL_3='4b'!$E$2:$F$14K6, I5:I6
 
Upvote 0
OK I will repost my suggestion.
I had moved the data lower. Your post said " I have a cell of Sum (E5)"
You did not state where the data was located.

Try the alternative that you prefer.
T202105a.xlsm
ABCDEFGHIJKL
1
21227155328Data1156.57.73.02
33329165529
46431175730ResultsSumCorresponding Value#N/A
5853318593133.221818
69635196132331818#N/A
711737206333
813839216534
915941226735
10171043236936
11191145247137
12211247257338
13231349267539
14251451277740
4b
Cell Formulas
RangeFormula
H5H5=SUM(H2:L2)
I5I5=CHOOSE(MATCH(ROUND(H5,0),{1,27,53},1),VLOOKUP(ROUND(H5,0),A2:B14,2,0),VLOOKUP(ROUND(H5,0),C2:D14,2,0),VLOOKUP(ROUND(H5,0),E2:F14,2,0))
K4K4=VLOOKUP(H6,rL_1,2,0)
K5K5=VLOOKUP(H6,rL_2,2,0)
H6H6=ROUND(SUM(H2:L2),0)
I6I6=CHOOSE(MATCH(H6,{1,27,53},1),VLOOKUP(H6,rL_1,2,0),VLOOKUP(H6,rL_2,2,0),VLOOKUP(H6,rL_3,2,0))
J6J6=AGGREGATE(14,6,K4:K6,1)
K6K6=VLOOKUP(H6,rL_3,2,0)
Named Ranges
NameRefers ToCells
rL_1='4b'!$A$2:$B$14K4, I5:I6
rL_2='4b'!$C$2:$D$14K5, I5:I6
rL_3='4b'!$E$2:$F$14K6, I5:I6
E5 become H5
 
Upvote 0
OK I will repost my suggestion.
I had moved the data lower. Your post said " I have a cell of Sum (E5)"
You did not state where the data was located.

Try the alternative that you prefer.
T202105a.xlsm
ABCDEFGHIJKL
1
21227155328Data1156.57.73.02
33329165529
46431175730ResultsSumCorresponding Value#N/A
5853318593133.221818
69635196132331818#N/A
711737206333
813839216534
915941226735
10171043236936
11191145247137
12211247257338
13231349267539
14251451277740
4b
Cell Formulas
RangeFormula
H5H5=SUM(H2:L2)
I5I5=CHOOSE(MATCH(ROUND(H5,0),{1,27,53},1),VLOOKUP(ROUND(H5,0),A2:B14,2,0),VLOOKUP(ROUND(H5,0),C2:D14,2,0),VLOOKUP(ROUND(H5,0),E2:F14,2,0))
K4K4=VLOOKUP(H6,rL_1,2,0)
K5K5=VLOOKUP(H6,rL_2,2,0)
H6H6=ROUND(SUM(H2:L2),0)
I6I6=CHOOSE(MATCH(H6,{1,27,53},1),VLOOKUP(H6,rL_1,2,0),VLOOKUP(H6,rL_2,2,0),VLOOKUP(H6,rL_3,2,0))
J6J6=AGGREGATE(14,6,K4:K6,1)
K6K6=VLOOKUP(H6,rL_3,2,0)
Named Ranges
NameRefers ToCells
rL_1='4b'!$A$2:$B$14K4, I5:I6
rL_2='4b'!$C$2:$D$14K5, I5:I6
rL_3='4b'!$E$2:$F$14K6, I5:I6
Can you keep the form of the yellow table ?
 
Upvote 0
The formulas Dave has posted work fine in your "yellow" table. Without the named ranges options as I haven't set them up...

Book2
ABCDEFGHIJKL
1LenghtValueLenghtLenghtData
212271553281156.57.73.02
33329165529
46431175730
58533185931Sumcorrespond value
696351961323318
711737206333
813839216534
915941226735
10171043236936
11191145247137
12211247257338
13231349267539
14251451277740
Sheet2
Cell Formulas
RangeFormula
H6H6=ROUND(SUM(H2:L2),0)
I6I6=CHOOSE(MATCH(H6,{1,27},1),VLOOKUP(H6,A2:B14,2,0),VLOOKUP(H6,C2:D14,2,0),VLOOKUP(H6,E2:F14,2,0))

or
Book2
ABCDEFGHIJKL
1LenghtValueLenghtLenghtData
212271553281156.57.73.02
33329165529
46431175730
58533185931Sumcorrespond value
6963519613233.2218
711737206333
813839216534
915941226735
10171043236936
11191145247137
12211247257338
13231349267539
14251451277740
Sheet2
Cell Formulas
RangeFormula
H6H6=SUM(H2:L2)
I6I6=CHOOSE(MATCH(ROUND(H6,0),{1,27,53},1),VLOOKUP(ROUND(H6,0),A2:B14,2,0),VLOOKUP(ROUND(H6,0),C2:D14,2,0),VLOOKUP(ROUND(H6,0),E2:F14,2,0))


Edited to put in the separate formula boxes
 
Last edited:
Upvote 0
The post with your formatting.
N.B. You can copy the post to a clean sheet; use the icon below the f(x).

T202105a.xlsm
ABCDEFGHIJKL
1LengthValueLengthLengthData
212271553281156.57.73.02
33329165529
46431175730Sumcorrespond value
5853318593133.2218
696351961323318
7117372063333318
813839216534#N/A
91594122673518
10171043236936#N/A
11191145247137
12211247257338
13231349267539
14251451277740
4c
Cell Formulas
RangeFormula
H5H5=SUM(H2:M2)
I5I5=CHOOSE(MATCH(ROUND(H5,0),{1,27,53},1),VLOOKUP(ROUND(H5,0),A2:B14,2,0),VLOOKUP(ROUND(H5,0),C2:D14,2,0),VLOOKUP(ROUND(H5,0),E2:F14,2,0))
H6H6=ROUND(SUM(H2:L2),0)
I6I6=CHOOSE(MATCH(H6,{1,27,53},1),VLOOKUP(H6,A2:B14,2,0),VLOOKUP(H6,C2:D14,2,0),VLOOKUP(H6,E2:F14,2,0))
H7H7=ROUND(SUM(H2:L2),0)
I7I7=AGGREGATE(14,6,K8:K10,1)
K8K8=VLOOKUP(H7,A2:B14,2,0)
K9K9=VLOOKUP(H7,C2:D13,2,0)
K10K10=VLOOKUP(H7,E2:F14,2,0)
 
Upvote 0

Forum statistics

Threads
1,216,124
Messages
6,128,997
Members
449,480
Latest member
yesitisasport

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