# Help adding text to my IF formula

#### erniepoe

##### Active Member
Hi All,

Was hoping to add a little text to the end of following formula. It is working fine, but for the false condition of the IF statement, it will just return the number of times the condition is met. So for the below example, it is returning 2, which is correct, but I was hoping to add the text phrase "tied with" to the number the formula is returning, so that when the formula returns the 'value if false' statement, it would be outputting the phase "2 tied with" to the cell.

Thanks so much for any help,
Ernie

=IF(COUNTIF(H3:H33,S4)=1,INDEX(A3:A33,MATCH(S4,D3:D33,FALSE),1),COUNTIF(H3:H33,S4))

### Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi All,

Was hoping to add a little text to the end of following formula. It is working fine, but for the false condition of the IF statement, it will just return the number of times the condition is met. So for the below example, it is returning 2, which is correct, but I was hoping to add the text phrase "tied with" to the number the formula is returning, so that when the formula returns the 'value if false' statement, it would be outputting the phase "2 tied with" to the cell.

=IF(COUNTIF(H3:H33,S4)=1,INDEX(A3:A33,MATCH(S4,D3:D33,FALSE),1),COUNTIF(H3:H33,S4))

Your question is not entirely clear, but I think you are wanting to add the text to the FALSE condition only. If so, try this...

=IF(COUNTIF(H3:H33,S4)=1,INDEX(A3:A33,MATCH(S4,D3:D33,FALSE),1),"tied with "&COUNTIF(H3:H33,S4))

yes Rick, thanks exactly. However, this returns the result "tied with 2" when I am looking to return "2 tied with). Do I just stick your ampersand and "tied with" quotes at the end of the formula?

yes Rick, thanks exactly. However, this returns the result "tied with 2" when I am looking to return "2 tied with). Do I just stick your ampersand and "tied with" quotes at the end of the formula?

Yes, moving the ampersand to the front and moving the blank "spacer" character to the back, of course...

=IF(COUNTIF(H3:H33,S4)=1,INDEX(A3:A33,MATCH(S4,D3:D33,FALSE),1),COUNTIF(H3:H33,S4)&" tied with")

Replies
7
Views
619
Replies
7
Views
263
Replies
5
Views
361
Replies
0
Views
669
Replies
0
Views
375

1,203,243
Messages
6,054,361
Members
444,718
Latest member
r0nster

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