Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mark Reynolds
 
Posts: n/a
Default Autofill data

Hi

I am new to excel and have a question regarding cells being filled with data
automatically

If I want to have a cell that contains a product, how do i get the cell next
to it to fill in the price automatically - I guess i am going to have to have
a set of prices allocated to a product somewhere in the sheet so it calls the
info in from this list?

Hope you kow what i mean

regards

mark
  #3   Report Post  
JulieD
 
Posts: n/a
Default

Hi Mark

here's an answer i posted a while back to a very similar question ...

---
use a combination of data / validation to create the drop down list and
VLOOKUP function to populate the related information

assuming that in Sheet2 you have the following

..........A..............B

1......Item.......Value

2..... Item1....10.00

3. .....Item2....15.00

4. ....Item3......20.00

now select from A1 to the end of your list (A4, in the above example) and
choose from the menu,

Insert / Name / Create - ensure Top Row is checked and click okay - you've
created a named range called "Item" (or whatever the title in A1 is)

now select from A1 to the end of the list for all columns (B4 in the above
example) and click inside the name box (left of formula bar) and type
MyTable and press enter - we've created a second named range.

Now click in the cell in Sheet1 where you want your drop down list to appear
and choose Data / Validation from the menu - in the settings tab, choose
List from the Allow drop down box and then click inside the white box under
this and press the F3 key - this will bring up a list of your range names,
choose "Item" (or whatever your first range was called) and click Ok. You
will now have a drop down list in this cell.

Now click in the cell where you want the related information to appear and
type

=VLOOKUP(A1,MyTable,2,false)

where A1 is the cell reference with your drop down list in it - you can

use

the F3 key for the MyTable bit too.

now choose an item & see the related information appear ... delete the item
and you'll get

a #NA error - this can be supressed by embedding your VLOOKUP in an IF
statement e.g.

=IF(A1="","",VLOOKUP(A1,MyTable,2,false))

where A1 is the cell reference with your drop down list in it

hope this helps, let us know how you go

Cheers

JulieD



"Mark Reynolds" <Mark wrote in message
...

Hi

I am new to excel and have a question regarding cells being filled with
data
automatically

If I want to have a cell that contains a product, how do i get the cell
next
to it to fill in the price automatically - I guess i am going to have to
have
a set of prices allocated to a product somewhere in the sheet so it calls
the
info in from this list?

Hope you kow what i mean

regards

mark



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
autofill question Ben H Excel Discussion (Misc queries) 0 March 2nd 05 03:37 PM
Help with data not getting plotted Scott Ehrlich Excel Discussion (Misc queries) 2 January 25th 05 05:17 AM
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 05:15 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Charting data ranges that change mikelee101 Charts and Charting in Excel 2 December 16th 04 11:07 PM


All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"