Text recognition

P

pdgood

Hi, I'm looking for a formula that recognizes a specific word of text in
a cell and then does a lookup in another column.
Example: B2 lists a type of film such as BASF or AGFA. Columns C,D, and
E represent size dimensions and column F is the square inches of the
corresponding cells in that row. (B2= BASF, C2=8, D2=x, E2=10, F2=80)
So, I'd like to find a formula to put in G2 that would return the
square inches only if BASF appears in B2 and returns 0 or blank if
not.

B C D E F G
BASF 8 X 10 80 80


Many thanks for your help!
 
R

Ragdyer

If *only* the exact data "BASF" is in B2, try this:

=IF(B2="BASF",F2,"")

If BASF can be combined with other text in B2, you could try this:

=IF(ISNUMBER(SEARCH("BASF",B2)),F2,"")

You can copy down as needed.
 
M

Max

One play which might also suffice ..

Assume we list across in

G1: BASF
F1: AGFA
etc

(these will be the col headers)

then we could put in G2:
=IF(TRIM($B2)="","",IF(TRIM($B2)=G$1,$F2,""))
then copy G2 to F2 (or more, depending)
and then fill down as far as required

That'll give us the returns from col F (square inches)
neatly under each of the headers in G1 across
(it'll return blanks: "" otherwise)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top