close

How would I write an IF statement that instructs Excel to evaluate the first
six characters in a given cell? By that I mean, IF(A1 begins with ABCDEF,
then, ,). IF(A2 begins with GHIJKL, then, ,). Hmm, I will need several of
these IF's in a row since the contents could begin with about 8 differing
text patterns. How would I string the IF arguments together?

I want to perform a REPLACE on a group of cells that contain brand names.
Different brand names, different string lengths, therefore the need for the
IF statements.

Thanks....

You'd be better off constructing this with a LOOKUP function, especially
since IF statements can only be nested 7 levels deep.

Cheersquot;ConfusedNHoustonquot; gt; wrote in
message ...
gt; How would I write an IF statement that instructs Excel to evaluate the
first
gt; six characters in a given cell? By that I mean, IF(A1 begins with ABCDEF,
gt; then, ,). IF(A2 begins with GHIJKL, then, ,). Hmm, I will need several
of
gt; these IF's in a row since the contents could begin with about 8 differing
gt; text patterns. How would I string the IF arguments together?
gt;
gt; I want to perform a REPLACE on a group of cells that contain brand names.
gt; Different brand names, different string lengths, therefore the need for
the
gt; IF statements.
gt;
gt; Thanks....
Here's Dave Peterson's answer to a similar question in another forum. It
might help a little.How about adding another column, then extract the first 5 digits of that
value.

=left(B2,5)
(if they're always 10 characters)

or
=left(text(b2,rept(quot;0quot;,10)),5)

or something????

Then use that column to extract the data.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()