Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel "mark" row that contains text string 1

Status
Not open for further replies.

swtrader

IS-IT--Management
Dec 23, 2004
182
US
I need to search all populated cells in a column B and return a "mark" (x?) in the same row, column A if the text in column B's cell contains a specified text string.

Should I attempt first to extract the text string to a cell and then mark A......or??

thanks for your help.

swtrader
-- If you don't know where you're going, you'll always know when you're not there.
 



Hi,

Consider using the AutoFilter Custom Criteria Contains.

Then, if it's REALLY necessary, loop thru the rows using the SpecialCells(xlCellTypeVisible) to assign that value in the desired column.

Skip,

[glasses] [red][/red]
[tongue]
 
That works great. Much simpler than I expected.

Thanks.

swtrader
-- If you don't know where you're going, you'll always know when you're not there.
 
No need to loop if the value is the same in each range, just assign the specialcells method to the object as Skip says.

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
I use Conditional Format a lot and you can send the files to anyone without virus checkers and people going loopy.

Link the condition to the contents of one fixed cell ($A$1 say) and type the text there. Colour the cells that have the data, or whole rows. The only proviso is with multiple conditions - if #1 is satified #2 & #3 are ignored, but usually on condition and change the monitor cell manually does the trick.

If I am sorting (in VBA say) afterwards I usually have formulae in one column looking for the text in the operative column and equating to "x" or "" . Then VBA lines to cut and pastspecial (values) and sort on the "text(no formulae)" column. Beware altering the column with formulae in - have it off screen somehow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top