Multiple arguments?

E

Ed Anton

When using an argument set to convert text to numerals between 2 sheets, I
have found that I can only use a maximum of 2 arguments. If there is more
than 2 options within the text to convert how would I do this?

I.e.

Other = O
Gas Warm Air = G
Gas / Oil = G
Electric Storage = E

etc...

Thanks...
 
P

Peo Sjoblom

Are you talking about VBA or functions? Assuming you meant functions
you would need to use more than one character (in this case to make them
different from each other), how else would
you or anyone else differentiate between G and G?


Regards,

Peo Sjoblom
 
E

Ed Anton

Peo,

Thanks, but there is no need to differentiate between the two "G"s. The idea
is to group both types under the same heading. I wasn't planning on doing it
in VBA if I can possibly help it, but is that the only way to create multiple
argument formulae? How would I go about it?

Ta.
 
F

Frank Kabel

Hi
not very clear what you're trying to do. what kind of formula are you using
currently?
 
E

Ed Anton

Hi Frank,

In a nutshell; I'm trying to text on Sheet 1, to a different form of text on
Sheet 2.

The problem is, I have multiple possibilities and the formula I was using
will only allow me a maximum of 2. Here is the formula I was using:

=IF(Sheet1!A1="Other Non-central Or Non Programmab","O", IF(Sheet1!A1="Gas
Warm Air","G"))

The problem is, it won't allow me any further arguments. What I need is to
create a formula that will substitute the following...

Other Non Central Or Non Programmab = O
Gas Warm Air = G
Gas/Oil Boiler and Rads = G
Electric Storage = E
'Blank' = O

Any help you can give me would be really appreciated.

Many thanks,

Ed.
 
D

Dave Peterson

I would create a table in another worksheet (sheet2??)

And put the strings in column A and the values in column B.

Then you could use =vlookup() to return the value associated with the string:

=vlookup(sheet1!a1,sheet2!a:b,2,false)

And if you're not familiar with =vlookup(), Debra Dalgleish has nice
instructions at:
http://www.contextures.com/xlFunctions02.html
 
Top