formulas - Excel - If cell contains string or numbers, insert another string next to it? -


i'm wondering if it's possible in excel:

let's have columns a, b, , c.

column c contains numbers, example, 234 or 590

i want "apple" added column d if 234 appears in column c in cell left of it. want "orange" added column d if 590 appears in column c in cell left of it.

if possible... i'm wondering if can take 1 step further:

let's in tab in same spreadsheet, have column number , column string corresponding each number (ex: 234 = apple, 590 = orange, 300 = pear). there way me tell excel, "if number in cell in 1 spreadsheet matches number in cell in spreadsheet, insert string next cell in other spreadsheet current spreadsheet next cell containing same number."

that might sound confusing... here example:

spreadsheet 1 has 3 columns formatted this:

3/5  | apple  | 500 3/7  | pear   | 200 3/9  | banana | 100 

spreadsheet 2 has following columns:

500 | super cool 250 | cool 200 | cool 150 | little cool 100 | warm 

i want add column in spreadsheet 1 next each number containing corresponding string. becomes:

3/5  | apple  | 500 | super cool 3/7  | pear   | 200 | cool 3/9  | banana | 100 | warm 

does make sense? let me know if need clarification , if me out.

thanks!

you don't need vba this. simple lookup formula work. use formula wizard - click formulas, lookup , reference, , follow prompts provide input.

for instance, given following data:

            b 1  pear      500 2  apple     700 3  banana    600 

and following lookup table:

     j        k 1   500      cool 2   600      cool 3   700      super cool 

insert following formula cell c1

=lookup(b1, j1:j3, k1:k3) 

and copy c2 , c3

            b       c 1  pear      500     cool 2  apple     700     super cool 3  banana    600     cool 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -