Josselin has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Compare a column to a character
I would like to know how to compare a column (any character in a column) to an other character, character being a number or text or logic function.
i.e. IF (A1:A10<>10, "All the numbers from the column A are different from 10", "There is at least one number from the column A equal to 10")
I look forward to hear from you.
Thanks,
Joss
RE: Compare a column to a character
Hi Joss
Thanks for getting in touch. I recommend you embed a COUNTIF function within your IF, like so.
=IF(COUNTIF(A1:A10,"=10")>0,"There is at least one number from the column A equal to 10","All the numbers from the column A are different from 10")
In other words, "if you can count at least one 10, display the first message, otherwise the second".
Kind regards
Gary Fenn
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector