98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Compare a column to a character
Compare a column to a character
Resolved · Low Priority · Version 2010
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
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Move to edge of data blockWhen data is held in a block, however large, use the Ctrl key with your cursors to move quickly to the far edge of the block. Works with all 4 direction keys. |