Copying cell text data to another cell in the same row if a condition is met

1.3k Views Asked by At

I'm looking to organize a worksheet and to do so I need to copy the text information from one cell to another if the word "course" is at the beginning of the cell. So for example:

A2 = Course LAW info info LAW
A3 = info info  info info
A4 = Course PSY info info PSY
A5 = info info  info info

In the above example, text in cells A2 and A4 (which start with "Course") would be copied to cells B2 and B4.

1

There are 1 best solutions below

0
On

If all you are looking for is to check for a specific word at the beginning of a cell value, a simple Excel formula will work, which is faster and more efficient than a macro. Something like

=IF(LOWER(LEFT(A1,LEN("course")))="course",A1,"")

This will either copy the value of the cell, or a blank to the cell containing the formula.