cell value

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

Guest

I want to input a certain account coding based on the value of another cell
Example: I have 5 offices ZZ,YY,XX,WW,UU which will be keyed in cell A.
In cell G I want the accounting code to appear automatically based on the office code I key in cell A
 
Hi
- create a lookup table with your office code in column A and the
matching accounting code in column B
- on your inoput sheet use vLOOKUP. Something like
=VLOOKUP(A1,'lookup_table'!$A$1:$B$100,2,0)

See:
http://www.mvps.org/dmcritchie/excel/vlookup.htm

--
Regards
Frank Kabel
Frankfurt, Germany

rana8689 said:
I want to input a certain account coding based on the value of another cell.
Example: I have 5 offices ZZ,YY,XX,WW,UU which will be keyed in cell A.
In cell G I want the accounting code to appear automatically based on
the office code I key in cell A
 
If the actual office codes are as you posted, then you could try this
formula, and just replace the accounting codes with the real ones.
The office codes *must* be in ascending order.

=LOOKUP(A1,{"UU","WW","XX","YY","ZZ";"uu123","ww456","xx789","yy321","zz654"
})

--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


I want to input a certain account coding based on the value of another cell.
Example: I have 5 offices ZZ,YY,XX,WW,UU which will be keyed in cell A.
In cell G I want the accounting code to appear automatically based on the
office code I key in cell A
 
VLOOKUP FUNCTION WORKS WELL BUT LOOKUP FUNCTION DOES NOT WORK IF THE OFFICE CODE IS KEYED IN WRONGLY. iF i KEY IN AN UNKNOWN OFFICE CODE IT PULLS UP THE LAST ACCOUNT CODE GIVEN IN THE FUNCTION. iS THERE A REMEDY FOR THAT.
 
Use the vlookup function and stop using caps, it's considered shouting

--


For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom

RANA8689 said:
VLOOKUP FUNCTION WORKS WELL BUT LOOKUP FUNCTION DOES NOT WORK IF THE
OFFICE CODE IS KEYED IN WRONGLY. iF i KEY IN AN UNKNOWN OFFICE CODE IT
PULLS UP THE LAST ACCOUNT CODE GIVEN IN THE FUNCTION. iS THERE A REMEDY FOR
THAT.
 
This will give you an error message (#N/A), when the *wrong* office code is
entered:

=CHOOSE(MATCH(A1,{"UU","WW","XX","YY","ZZ"},0),"uu123","ww456","xx789","yy32
1","zz654")
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


VLOOKUP FUNCTION WORKS WELL BUT LOOKUP FUNCTION DOES NOT WORK IF THE OFFICE
CODE IS KEYED IN WRONGLY. iF i KEY IN AN UNKNOWN OFFICE CODE IT PULLS UP
THE LAST ACCOUNT CODE GIVEN IN THE FUNCTION. iS THERE A REMEDY FOR THAT.
 
Back
Top