Nested If w/ VLOOKUP & Ranges

mhasham

Board Regular
Joined
Feb 28, 2013
Messages
63
Hello Folks,

Im looking to create a group based of the following categories with a specific set of range rules.

E= IF column (e) is >5
and column (c) <5
and SUM column (es1+es2) <5
else BLANK

C= IF column (c) is >5
and column (e) <5
and SUM column (es1+es2) <5
else BLANK

EC= IF column (c) is >5
and column (e) >5
and SUM column (es1+es2) <5
else BLANK

ES= IF SUM column (es1+es2) >5
else BLANK

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]User[/TD]
[TD]electronics (e)[/TD]
[TD]cats (c)[/TD]
[TD]special 1 (es)[/TD]
[TD]special 2 (es)[/TD]
[/TR]
[TR]
[TD]Brett Hart[/TD]
[TD]176[/TD]
[TD]66[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Charlie Murphy[/TD]
[TD]34[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Sam Pelt[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]53[/TD]
[TD]53[/TD]
[/TR]
[TR]
[TD]Max Keller[/TD]
[TD]3[/TD]
[TD]45[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]


SOLUTION that I'm trying to strive for is listed below. This would be on a separate worksheet and where the formula would be placed. This would be reading off of the data worksheet. I am thinking it probably requires a Nested IF statement in combination with a VLOOKUP for the User names and the ability to read column headers or column numbers or something to that nature.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]User[/TD]
[TD]Group[/TD]
[/TR]
[TR]
[TD]Brett Hart[/TD]
[TD]EC[/TD]
[/TR]
[TR]
[TD]Charlie Murphy[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]Sam Pelt[/TD]
[TD]ES[/TD]
[/TR]
[TR]
[TD]Max Keller[/TD]
[TD]C[/TD]
[/TR]
</tbody>[/TABLE]


Any help would be much appreciated

Regards Mo.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi mhasham,

This works on my sheet the trick will be getting the sheet references right between sheets. I recommend getting this working on the same sheet first, then we amend to suit across sheets after.

If you let me know what you're sheets are called and the specific range of your data I could try to adjust for you;


Book1
ABCDE
1Userelectronics (e)cats (c)special 1 (es)special 2 (es)
2Brett Hart1766600
3Charlie Murphy34400
4Sam Pelt605353
5Max Keller34500
6
7UserGROUP
8Brett HartEC
9Charlie MurphyE
10Sam PeltES
11Max KellerC
Sheet1
Cell Formulas
RangeFormula
B8=IF(SUM((VLOOKUP(A8,$A$2:$E$5,4,0)+(VLOOKUP(A8,$A$2:$E$5,5,0))))>5,"ES",IF(AND(VLOOKUP(A8,$A$2:$E$5,2,0)<5,VLOOKUP(A8,$A$2:$E$5,3,0)>5,SUM((VLOOKUP(A8,$A$2:$E$5,4,0)+(VLOOKUP(A8,$A$2:$E$5,5,0))))<5),"C",IF(AND(VLOOKUP(A8,$A$2:$E$5,2,0)>5,VLOOKUP(A8,$A$2:$E$5,3,0)<5,SUM((VLOOKUP(A8,$A$2:$E$5,4,0)+(VLOOKUP(A8,$A$2:$E$5,5,0))))<5),"E",IF(AND(VLOOKUP(A8,$A$2:$E$5,2,0)>5,VLOOKUP(A8,$A$2:$E$5,3,0)>5,SUM((VLOOKUP(A8,$A$2:$E$5,4,0)+(VLOOKUP(A8,$A$2:$E$5,5,0))))<5),"EC",""))))
 
Upvote 0
Sorry for the late reply. This worked wonders!!!!
I changed the hard coded values into a percentage threshold.

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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