In the attached excel workbook, what code would I use to identify all rows that contain a number in column B?

I have an excel file with the columns subject ID and diagnosis (about 3000 rows).

For each subject ID there are 5 diagnosis: MDE, Manic, Hypomanic, Mixed and Dysthymic.
I need to automate the identification of all subject IDs where at least one of the 5 diagnoses in column B is followed by a number.  Please see attached sample file. In the sample file, if at least of of the 5 diagnoses is followed by a number, I highlighted all five.
I would like to have code that would either highlight all five diagnosis for any subject where at least one of the five was followed by a number or copy and paste the subject ID and the data in the  adjacent cells in row B into another spread sheet as shown in the sample file (output sheet).
Thanks
LIFEchartee.xls
PDSWSSAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
You can enter this formula on row 2 of any blank column and copy it all the way down

=NOT(ISNA(MATCH($A2,IF(FIND(":",$B$2:$B$5000)<LEN($B$2:$B$5000),($A$2:$A$5000)),0)))

You can now filter on the True values
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Milind KoyandeCommented:
Hello,

You can use conditional formatting to perform the task (please check the attached file).

I have used following Formula
==
=COUNTIF($A$2:$A$109,A2)>5
==

Also please refer : http://www.ozgrid.com/Excel/Formulas.htm for more help.

Thanks,
Milind MK
LIFEchartee-1.xls
0
PDSWSSAuthor Commented:
Hi Milind,

Thanks for your response. Not clear to me from the attached file how your solution works.
Where do you paste the formula?
And what is the meaning of the green highlighted Subjecxt IDs?
0
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

PDSWSSAuthor Commented:
Saqib Husain, Syed:

Thanks for your solution. Appears to work perfectly.
I am waiting for a response from the other expert before I award points.
Thanks again
0
Saqib Husain, SyedEngineerCommented:
Apparently he did not understand the requirement correctly. That solution is highlighting all items which have exactly 5 diagnoses. Less than 5 diagnoses is not highlighted.
0
PDSWSSAuthor Commented:
Your code highlighted all cells in the column that contained a number.You were close enough. Still solves my issue. Thanks
0
Saqib Husain, SyedEngineerCommented:
My apologies. I forgot to mention that the formula is an ARRAY formula. Do you know how to enter an array formula?
0
PDSWSSAuthor Commented:
What I did worked - copied and pasted into C2, pressed enter and then clicked on the left bottom corner of the cell which filled the entire column with either False or True (in correct place).
0
PDSWSSAuthor Commented:
Thanks again. Very helpful solution.
0
Saqib Husain, SyedEngineerCommented:
I still feel that you are missing the real result. Take a look at the formula same formula applied in both ways in the attached file.
LIFEchartee-2.xls
0
PDSWSSAuthor Commented:
Well your are correct.  This completely addresses my question.

Thanks for being so honorable.  PDSWSS
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.