Home > front end >  If part of string matches populate specific value in other column/cell
If part of string matches populate specific value in other column/cell

Time:01-11

I am using googlesheets, and needs help with a formula for the below usecase.

if a number from column B matches the part of the number from column A then populate specific value in column C

for example: of value from column B = 0000 matches partly in column A (its always last 4 to matches in column A) then populate APPLE in column C

enter image description here

CodePudding user response:

Putting

=if(REGEXMATCH(A1,B1), "APPLE", "")

into cell C1 will work, just make sure to change "APPLE" for whatever your text source is.

To have it go down the whole column automatically put this in C1 instead:

=ARRAYFORMULA(if(REGEXMATCH(A1:A,B1:B), F1:F, ""))

Assuming that column F has your strings you want to check:

enter image description here

  •  Tags:  
  • Related