excel formulas

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I need to write a formula that if a cell on a worksheet contains a number a
cell on a different worksheet within the workbook returns a different number.
There are 5 different numbers - can someone help please.

Thanks in advance

Anne
 
Bit light on detail. Essentially it is

=(A1=1,Sheet2!A1,IF(A1=2,Sheet2!B1,IF(...)))
 
:

Hi I probably wasn't very clear!!!

On sheet 1 in cell E7 to E700 it may have A0014A to A0014G. Depending what
is in that cell on sheet 3 in the same workbook I need to convert this to a
different number eg A0014A will become W123, A0014B will become ENG, A0014C
will become FF37, A0014D will become FF46, A0014E will become Route 3, A0014F
will become Piccadilly and A0014G will become SWIM 111. Hope this is more
explainatory.

Thanks
 
=IF(Sheet3!E7="A0014A","W123",IF(Sheet3!E7="A0014B,"ENG", ...

and so on, copy down to E700
 
Tried that

Like this??
=IF(Timesheets!E7="A0014A","W123",IF(Timesheets!E7="A0014B","ENG",IF(Timesheets!E7="A0014C","FF37",IF(Timesheets!E7="A0014D","FF46,IF(Timesheets!E7="A0014E","ROUTE 3",IF(Timesheets!E7="A0014F","PICCADDILLY")

And all I got was

The formula you typed contains an error.

Should I have more ) in??
 
:

Hi I probably wasn't very clear!!!

On sheet 1 in cell E7 to E700 it may have A0014A to A0014G. Depending what
is in that cell on sheet 3 in the same workbook I need to convert this to a
different number eg A0014A will become W123, A0014B will become ENG, A0014C
will become FF37, A0014D will become FF46, A0014E will become Route 3, A0014F
will become Piccadilly and A0014G will become SWIM 111. Hope this is more
explainatory.

Thanks

Try this:

=IF(COUNTIF(ConvTbl,Sheet1!E7)=0,"",VLOOKUP(Sheet1!E7,ConvTbl,2,0))

and copy down 693 rows.

ConvTbl is a named range which looks like:

A0014A W123
A0014B ENG
A0014C FF37
A0014D FF46
A0014E Route 3
A0014F Piccadilly
A0014G SWIM 111


You may substitute a range reference, or you may substitute the array constant.

Also, depending on your regional settings, you may need to substitute
semicolons for the commas in the above formula.




--ron
 
Perhaps try a VLOOKUP ?
(averts the nested IF limit, and easier to maintain)

In say, Sheet1
Set-up a reference table
in cols A and B, from row1 down:

A0014A W123
A0014B ENG
A0014C FF37
etc

Then we could use in say, Sheet2's B2:

=IF(ISNA(MATCH(Timesheets!E7,Sheet1!$A:$A,0)),
"",VLOOKUP(Timesheets!E7,Sheet1!$A:$B,2,0))


--
Annerobbo said:
Tried that

Like this??
=IF(Timesheets!E7="A0014A","W123",IF(Timesheets!E7="A0014B","ENG",IF(Timeshe
ets!E7="A0014C","FF37",IF(Timesheets!E7="A0014D","FF46,IF(Timesheets!E7="A00
14E","ROUTE 3",IF(Timesheets!E7="A0014F","PICCADDILLY")
 
Like this

=IF(Timesheets!E7="A0014A","W123",IF(Timesheets!E7="A0014B","ENG",IF(Timeshe
ets!E7="A0014C","FF37",IF(Timesheets!E7="A0014D","FF46",IF(Timesheets!E7="A0
014E","ROUTE 3",IF(Timesheets!E7="A0014F","PICCADDILLY"))))))

--
HTH

Bob Phillips

Annerobbo said:
Tried that

Like this??
=IF(Timesheets!E7="A0014A","W123",IF(Timesheets!E7="A0014B","ENG",IF(Timeshe
ets!E7="A0014C","FF37",IF(Timesheets!E7="A0014D","FF46,IF(Timesheets!E7="A00
14E","ROUTE 3",IF(Timesheets!E7="A0014F","PICCADDILLY")
 

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

Back
Top