I have got the following formula that looks at a cell, and if it contains the characters "IDE" anywhere on the text then it puts a "Y" on the column, otherwise an "N".
=IF(COUNTIF(J1021, "*IDE*"),"Y", "N")
What I want to do is actually modify this formula so it only puts a "Y" on the cell if the last 3 characters of the cell are "IDE", not just a match anywhere.
That way I can have something like this.
CodePudding user response:
Using RIGHT()
Function
• Formula used in cell B1
=IF(RIGHT(A1,3)="IDE","Y","N")
You can also do a BOOLEAN LOGIC
here,
• Simply enter the formula in cell C1
=(RIGHT(A1,3)="IDE")*1
And then Custom format the cell by pressing CTRL
1
--> Format Cells
--> Number Tab
--> Category
--> Custom
--> Type
-->
[=1]"Y";[=0]"N";
But note the cells will show 1
for a TRUE
value & 0
for a FALSE
value.
CodePudding user response:
I would just use the function you have already and edit it like so:
IF(COUNTIF(A1,"*IDE"),"Y","N")