Conditional formatting for table header if table range contains non-numeric characters

ausswe

New Member
Joined
Feb 19, 2013
Messages
48
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi, I've been trying to find a way to use conditional formatting for a the header if the column for that table contains non-numeric characters as I come across this happening when receiving exported data.

I have tried using ISTEXT and ISNUMBER together with an IF statement but haven't gotten it to work - and I read that those can't be used in an array so that might be why, so I thought I'd check if anyone has a clever way to do this:

In my table column C should contain numbers only (in C2:Cxxx), I would like the header (C1) to change apparence if a non-numeric value is present in C2:Cxxx. I have tried to use different ranges and even tried using named ranges at this would be more efficient as the data range changes (C1 = DATA[[#Headers];[NUMBER]] and C2:Cxxx = DATA[NUMBER]).

If conditional formatting is not an option - another option would be to have a text of warning to appear in a cell on the cheat (moving the data down one row and add a formula to check in C1 for example).

Any suggestions would be appreciated!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Does this do what you want?

ausswe.xlsm
ABCD
1Hdr1Hdr2NUMBERHdr4
2data4
3data5
4data15
5dataxx
6data
7data26
8data
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C1Expression=COUNT(INDIRECT("DATA[NUMBER]"))<>COUNTA(INDIRECT("DATA[NUMBER]"))textNO
 
Upvote 0
Solution
Formula for C2:C15. If range contains text value=TRUE else FALSE.
Excel Formula:
=ISERROR(SUMPRODUCT(1*((0+$C$2:$C$15)=$C$2:$C$15)))

NOTE: Text formatted numbers are also treated as text by excel.
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,083
Members
453,021
Latest member
Justyna P

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