Question on how to do a formula to fill data in cells and highlight

MrsFrankieH

Active Member
Joined
Mar 25, 2011
Messages
323
Office Version
  1. 365
Platform
  1. Windows
Hello everyone.
My computer is a Dell and my operating system is Windows 10. I also have Excel from Office 2013.
Could you please help me with a formula? Forgive me for not knowing the terminology for excel functions.



I want to make a formula which would identify certain lottery draws. Each draw will be either “singles” (draws with different numbers), “doubles”; draws with two numbers that are alike, “triples”; draws that have three numbers that are alike; and quadruples; numbers that have all 4 numbers that are alike.
In the above picture, there are lottery draws that have numbers in the draw that are different (single) drawn numbers. For example on November 6, 2016, 4295 was drawn. Each number is different. I would like the different drawn numbers highlighted with the letter “S” for “single” in the cell in front of the drawn number like this….



I would also like the draws with two numbers (Doubles) that are the same. For example November 5 has 6463. Like the ones with different number, I’d like the numbers to be highlighted with the letter “D” for double in the cell in front of the draw.




I’d like for the same process to work for Triples and Quadruples. On November 6th, 4344 came out as a Triple. I’d like a “T” (for triple) to show up in front of the draw date and highlight the draw.




In this photo, no quadruples are drawn but I’d like to be able to copy and paste the draws into the appropriate cells and when a quadruple number is drawn, the “Q” (for quadruple) show up in the cell in front of the quadruple draw.
Thank you for your help in advance.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
In A1 put this
={CHOOSE(MAX(COUNTIF($D1:$G1,$D1:$G1)), "S","D","T","Q")}
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'}</style>You need to input it with CONTROL SHIFT ENTER and not just enter. The curly braces {} will be added if you do it correctly. Do not manually put in the curly braces.


Then select the values from A1 to A21 (or where ever) and also select the cells from D1 to G21. With BOTH ranges selected, add some new conditional formatting. (conditional formatting - Classic - "format only cells that contain" - Specific text - containing) and plug in one number for each of the outcomes, S, D, T, Q and choose the format to go with it.
 
Upvote 0
Thank you Tygrrboi!

You explained the process very comprehensively!! I'll try it in a few and let you know how it turned out. Thanks a ton for your help. I really appreciate your help!!
 
Upvote 0
Hello Tygrrboi,

The conditional formatting is the only thing i had problems with partially. I was able to highlight S,D,T,Q but the numbers in the same row didn't highlight. Any suggestions?

Thank you so much. :)
 
Upvote 0

Forum statistics

Threads
1,216,742
Messages
6,132,453
Members
449,729
Latest member
davelevnt

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