Link to home
Start Free TrialLog in
Avatar of RWayneH
RWayneHFlag for United States of America

asked on

Search for a value in Column?

Using VBA I was wondering if I could loop thru the contents of each cell in Column C (until it reaches a blank cell) looking for a value like DEPOSIT.  If the word DEPOSIT shows anywhere in the contents of the cell in column C, change the cells (of that row) A thru F green and put the value: "My pay check" in column F.

The odd part is that when searching column C, we are not searching for exact contains of the cell.  It is part of the contents.  Column C could be  "DEPOSIT 12-29-2016" but because it has the word DEPOSIT it would be true.

Looking for some assistance.  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Ejgil Hedegaard
Ejgil Hedegaard
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RWayneH

ASKER

Sorry I messed up a bit...  in Ln6 can we chg that to be an If And?  I need the contents of column C and Column A to be blank.  Is that a hard edit?
Avatar of RWayneH

ASKER

I should say this different...  sometimes there is blank in column C, but not in column A, but I am checking the cell contents of column C.  Hope this makes sense...  The dataset number of rows is determined by the number of rows in column A
Avatar of RWayneH

ASKER

Figured it out...  chg'd the C1 in Ln5 to A1 and it handled the whole dataset  works great.  Thanks!!
Avatar of RWayneH

ASKER

Thanks for the help.