ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Create a conditional formula to replace (https://www.excelbanter.com/excel-worksheet-functions/84781-create-conditional-formula-replace.html)

dot

Create a conditional formula to replace
 
Hi,
How could I check if the cell in a column starts with a certain alphabet, if
yes, then in a different columns cell add the word "DONE"
eg: validate column P, if a cell starts with XYZ, then in coulmn B, of the
same row, add the word "DONE"

Ron Coderre

Create a conditional formula to replace
 
Try this:

B1: =IF(LEFT(P1,3)="XYZ","DONE","")
OR
B1: =IF(COUNTIF(P1,"XYZ*"),"DONE","")

Copy either of those formulas down

Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP-Pro


"dot" wrote:

Hi,
How could I check if the cell in a column starts with a certain alphabet, if
yes, then in a different columns cell add the word "DONE"
eg: validate column P, if a cell starts with XYZ, then in coulmn B, of the
same row, add the word "DONE"


Pete_UK

Create a conditional formula to replace
 
Enter this is B2:

=IF(LEFT(P2,3)="XYZ","DONE","")

This leaves B2 blank if P2 does not start with XYZ. Copy the formula
down as necessary.

Hope this helps.

Pete



All times are GMT +1. The time now is 04:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com