# IF Statement Criteria Across Multiple Columns

#### BNL

##### New Member
I need to develop an "IF" statement that will check the entries across 10 columns in a single row and if the criteria is met in any of the columns, a "HT" would be entered in cell A11.

An example would be as follows:

Cells A1:A10 could contain a number 1 thru 10 depending on the row. As example could be A1=1, B1="", C1=3, D1=4, E1="", etc.

The IF criteria would be IF cell A1 or C1 or E1 contains any number, the true value would be to enter the word "HT" and the false value would be to move on to the next column or leave A11 blank once it has looked at all columns with no criteria met.

If a number existed in either A or C or E, cell A11 would be "HT" or if criteria not met, A11 would be blank.

Once the IF statement finds a column that meets the true criteria, it can stop at that point. In other words, all three columns DO NOT have to meet the criteria - only one of the three columns (A or C or E) out of the 10 total columns.

I would greatly appreciate some direction on developing this IF statement.

Thanks and have a great weekend!

Barry

### Excel Facts

Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

#### barry houdini

##### MrExcel MVP
Perhaps try

=IF(SUM(A1,C1,E1)>0,"HT","")

#### Ron Coderre

##### MrExcel MVP
Try this:
Code:
``A11: =IF(COUNT(A1:J1),"HT","")``
Does that help?

#### BNL

##### New Member
Thanks Barry - you have helped me out before and your solution works well. Thanks again for your quick response - hope everything is going well in England.

Ron - your Count solution doesn't work as it's counting across all the cells and they may all have number entries EXCEPT for the criteria cells A, C, & E and it still show the true value of "HT" in A11. Sorry, I might not have been plain in my problem statement.

Replies
35
Views
740
Replies
4
Views
135
Replies
1
Views
93
Replies
1
Views
126
Replies
1
Views
162

1,191,693
Messages
5,988,135
Members
440,127
Latest member
naxmax

### 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.

### Which adblocker are you using?

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

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