• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Text search location


New Member
Hi all, first post - be nice! :)

I'm trying to pull some data off of multiple sheets which are automatically generated each Sunday. The problem I have, the sheets are 250-285 rows long, and the columns grow every week (with trend information).

If I need to pull a specific bit of data, the titles in the rows aren't always in the same place.. If a category hasn't been sold, it won't appear in one sheet, but will be in another - pushing them 'out of whack' when compared.

Is there a way in which I could search for a word or phrase in a column, and the output be its row number? I can then use that in a HLOOKUP.

I can't use a VLOOKUP, as sometimes the weeks don't update or 1 is missed if there are no sales in that category - so I need to lookup both the week no., and the category I want to find.


x 1 2 3 4 5 6 7





I would want to look up 5c, but the location of 5c isn't necessarily in the same place, row b might not be there, and 4 might be missing from the sequence..

I hope that makes some sense!!

Or - another possibility - it is possible for a VLOOKUP to return the last piece of data? So I could VLOOKUP the phrase I want, and it would return the farest right column, of farest -1 if I want a WoW comparison, etc.


New Member
I'm not sure I know how to solve this particular problem for you or not, but something I've been using to search a cell for specific text is:


In this case I wrote this specific formula:


_ A___ | ____B

1 TRUE | Chandoo has a teriffic blog

It produces a true/false condtion, but I could also nest this into an IF statement to provide a numeric output.


So if it finds the word "blog", it produces a 1, or a zero if if doesn't.


New Member
I should add something here that you COULD apply the more basic formula to conditional formatting.

If you have Excel 2007 then there's a feature that does this automatically within Excel.

If you have an earlier version of Excel though, from the left hand drop down, select FORMULA IS, instead of CELL VALUE IS, and enter your formula.

You can use the simpler formula here:


Note: It's important to remove the dollar signs from your variables if you want the cell references to adjust relative to your format pasting. :)

David Coop

New Member
In you third paragraph, you were asking for a way to return the ROW NUMBER to a HLOOKUP formula. I suggest you use MATCH("Data you're lookung for", Range).


New Member
I had a hankering it might be MATCH, but didn't know what to do with it. (Not used it before!)

Perfect - thanks David! That's enough for me to work on now! Brill.