Conditional Formatting by row or column for numerical values

%3CLINGO-SUB%20id%3D%22lingo-sub-2828714%22%20slang%3D%22en-US%22%3EConditional%20Formatting%20by%20row%20or%20column%20for%20numerical%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2828714%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all.%20I%20have%20two%20questions%20and%20after%20spinning%20my%20wheels%20for%20several%20hours%20I'm%20hoping%20you%20can%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20I%20work%20with%20large%20datasets%20and%20often%20I%20would%20like%20to%20know%20the%20top%2C%20say%2C%202%20values%20in%20each%20column%20of%20numbers.%20There%20may%20be%20hundreds%20of%20columns%2C%20and%20say%2090%20rows.%20It's%20fine%20if%20the%20top%20values%20are%20all%20colored%20the%20same%2C%20but%20each%20column%20needs%20to%20be%20analyzed%20separately%20from%20every%20other%20column.%20I%20cannot%20seem%20to%20create%20a%20formula%20that%20works.%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESimilarly%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20I%20am%20working%20on%20a%20file%20where%20I%20want%20to%20know%20if%20any%20of%20the%20large%20number%20of%20columns%20are%20greater%20than%20or%20equal%20to%205%25%20of%20the%20value%20in%20the%20first%20column.%20So%20IF%20D1%3AID1%3D(%3D%26gt%3B(%24C1*.05))%20use%20red%20fill%2C%20and%20if%20D2%3AID2%3D(%3D%26gt%3B%24C2*.05))%20use%20red%20fill%2C%20etc.%20The%20same%20color%20in%20each%20row%20is%20fine%2C%20but%20I%20need%20each%20row%20analyzed%20individually%20to%20highlight%20only%20those%20columns%20where%20the%20value%20is%20greater%20than%20or%20equal%20to%205%25%20of%20the%20first%20value%20in%20the%20row.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20assistance%20would%20be%20greatly%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2828714%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2828800%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20by%20row%20or%20column%20for%20numerical%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2828800%22%20slang%3D%22en-US%22%3Etry%3A%3CBR%20%2F%3E1)%20%3D(D1%26gt%3B%3DLARGE(%24D1%3A%24ID1%2C2)%3CBR%20%2F%3E2)%20%3D(D1%26gt%3B%3D(%24C1%2B0.05)))%3CBR%20%2F%3Emake%20sure%20the%20range%20it%20is%20applied%20to%20is%20D1%3AID90%20or%20more%20specifically%20that%20the%20upper%20left%20of%20the%20range%20(D1)%20matches%20the%20cell%20in%20the%20formula%20(D1)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2828834%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20by%20row%20or%20column%20for%20numerical%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2828834%22%20slang%3D%22en-US%22%3EThank%20you%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E!%20But%20wouldn't%20that%20mean%20that%20I%20would%20need%20to%20apply%20that%20formula%20individually%20to%20each%20row%20or%20column%20as%20I%20go%20along%3F%20I'm%20hoping%20for%20formulas%20that%20I%20could%20apply%20to%20the%20whole%20worksheet%2C%20otherwise%20it's%20too%20time-consuming.%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2829678%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20by%20row%20or%20column%20for%20numerical%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2829678%22%20slang%3D%22en-US%22%3Eno.%20you%20could%20apply%20that%20to%20nearly%20the%20whole%20sheet%20(i.e.%20starting%20with%20column%20D%20and%20going%20right).%20The%20way%20conditional%20formatting%20works%20is%20that%20it%20will%20look%20at%20the%20top%20left%20cell%20in%20the%20range%20and%20apply%20the%20formula%20and%20then%20as%20it%20moves%20to%20each%20other%20cell%20in%20the%20range%20it%20applies%20the%20formula%20as%20if%20it%20was%20copied%20there%20and%20the%20references%20that%20are%20not%20locked%20using%20the%20'%24'%20before%20them%20move%20relative%20to%20the%20location%20of%20the%20new%20cell%20location.%20SO%20locking%20%24D...%3A%24ID...%20and%20%24C...%20lock%20those%20parts%20of%20the%20equation%20but%20let%20the%20rows%20adjust%20and%20the%20D1%20will%20always%20point%20at%20the%20cell%20of%20interest.%20(again%20assuming%20the%20top%20left%20of%20the%20Applied%20To%20range%20is%20D1)%3C%2FLINGO-BODY%3E
New Contributor

Hi all. I have two questions and after spinning my wheels for several hours I'm hoping you can help.

 

1. I work with large datasets and often I would like to know the top, say, 2 values in each column of numbers. There may be hundreds of columns, and say 90 rows. It's fine if the top values are all colored the same, but each column needs to be analyzed separately from every other column. I cannot seem to create a formula that works.

 

Similarly,

 

2. I am working on a file where I want to know if any of the large number of columns are greater than or equal to 5% of the value in the first column. So IF D1:ID1=(=>($C1*.05)) use red fill, and if D2:ID2=(=>$C2*.05)) use red fill, etc. The same color in each row is fine, but I need each row analyzed individually to highlight only those columns where the value is greater than or equal to 5% of the first value in the row.

 

Any assistance would be greatly appreciated!

3 Replies
try:
1) =(D1>=LARGE($D1:$ID1,2)
2) =(D1>=($C1+0.05)))
make sure the range it is applied to is D1:ID90 or more specifically that the upper left of the range (D1) matches the cell in the formula (D1)
Thank you @mtarler! But wouldn't that mean that I would need to apply that formula individually to each row or column as I go along? I'm hoping for formulas that I could apply to the whole worksheet, otherwise it's too time-consuming.
no. you could apply that to nearly the whole sheet (i.e. starting with column D and going right). The way conditional formatting works is that it will look at the top left cell in the range and apply the formula and then as it moves to each other cell in the range it applies the formula as if it was copied there and the references that are not locked using the '$' before them move relative to the location of the new cell location. SO locking $D...:$ID... and $C... lock those parts of the equation but let the rows adjust and the D1 will always point at the cell of interest. (again assuming the top left of the Applied To range is D1)