Regarding IF function or vLOOKUP function

G

Guest

I have two questions.

First,
See the below data.

123456 BOOKA
234555 BOOKB
345678 BOOKC
848599 BOOKD
111100 BOOKE
758844 BOOKF
877290 BOOKG
585858 BOOKH

I want : When I type 123456 in a cell, the cell will be changed to BOOKA
automatically. When I type 234555, the cell will be changed to BOOKB.........
How can do this request using IF fuction or vLOOKUP

Question 2.

How can I use IF or other functions to do ........

I have data in cell A1 (123456), and B1 (500pcs)
now, I would like to use IF or other functions to set that If A1 =123456 and
B1= 500pcs, C1 would be shown 20KGS automatically.
 
F

Frank Kabel

Hi
Question 1: You can't achieve this in the SAME cell with formulas. This
requires VBA. Maybe the following is what you're looking for (using a
listbox + VBA Code)
http://www.contextures.com/excelfiles.html
search for: Data Validation "Columns"

Question 2:
Where do you have these combinations tored (column C of your table?) Or
how is this calculated?
 
D

Debra Dalgleish

You could use the AutoCorrect feature to change the numbers to words.
For example:
Choose Tools>AutoCorrect Options
In the Replace box, type: 123456
In the With box, type: BOOKA
Click Add, and enter the next code
Click OK when finished.

Note: This codes will apply through the other Office applications, such
as Word, on your computer.

Question 2: You could create a table of weights for each item, and use
the VLOOKUP function to return the correct values. For example, your
table could be:

Code Item Weight
123456 BOOKA 20
234555 BOOKB 15

Select all the cells in this table
Click in the Name box at the left end of the Formula Bar
Type a name for the list, e.g. ItemList
Press the Enter key to complete the naming.

In cell A1, type a code from the list
In cell B1, type: =VLOOKUP(A1,ItemList,2,0)
In cell B1, type: =VLOOKUP(A1,ItemList,3,0)

There's information on VLookup in Excel's Help, and here:

http://www.contextures.com/xlFunctions02.html
 

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

Similar Threads

function how to! 6
Vlookup Function 3
vlookup Function 2
Vlookup returns value in the adjacent row 2
Even or Odd Year Function 3
Problem with IF function 3
Adding Cells, Get Error. 2
VLOOKUP Function 3

Top