View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein \(MVP - VB\)[_529_] Rick Rothstein \(MVP - VB\)[_529_] is offline
external usenet poster
 
Posts: 1
Default Search Columns for a word and stop

Just out of curiosity, did you try the formula I posted earlier?

Rick

"Mac" wrote in message
...
Hi!

Thanks you for the formula.... it is almost there...

This formula gives me when it was last sold. I need when it was first
sold. For example: If the item was sold between May and August 2007,
I need the formula to pick up May. The way the formula works now it
picks up August 2007

Thanks again!
mac



"Ragdyer" wrote in message
...
Try this *array* formula in N2, if there is the possibility that the rows
might contain *other* data, in addition to the text "sold":

=IF(ISNA(MATCH("sold",B2:M2)),"",INDEX(B1:M1,MATCH (2,1/(B2:M2="sold"))))

--
Array formulas must be entered with CSE, <Ctrl <Shift <Enter, instead
of
the regular <Enter, which will *automatically* enclose the formula in
curly
brackets, which *cannot* be done manually.
You *must also* use CSE when revising the formula.

*After the CSE entry, copy down as needed.

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Mac" wrote in message
...
I have a problem I am trying to solve, which is hard to explain:

I have a spreadsheet that in row 1 starting in column B has the
months:
Jan Feb Mar Apr ...........Dec (Columns B to M), in column N It has

"Last
start selling"

The cells below the month show when the items have been sold.... in
Column
N. I would like a formula in Column N (Last Start Selling) which
keeps

on
searching for the word Sold until the next column to the left is Blank.
The it stops and picks up the month from row 1 (this is the easy
part...)


Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Last
start selling
Item1 Sold

Sold
Sold Oct
Item 2 Sold
Sold
Sold Dec
Item 3 Sold SoldSold Sold
Jun

I hope this makes sense....

Thanks,
mac