corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Excell help needed


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Excell help needed
Matt H
Member

Registered: 11th Sep 01
Location: South Yorkshire
User status: Offline
16th Nov 09 at 18:35   View User's Profile U2U Member Reply With Quote

Right

I want to create a drop down list which will carry across other data

So, to give a basic example

Cat = 5
Dog = 10
Badger = 15

This information will be in coloumn A + B respectively

The drop down list is to contain the animal & will be in coloumn C. I can manage this bit

I then want the 'price' of each animal to appear in coloumn D once you've selected from the drop down list

Stuck as a fuck Help!
James_DT
Member

Registered: 9th Apr 04
Location: Cambridgeshire
User status: Offline
16th Nov 09 at 19:32   View User's Profile U2U Member Reply With Quote

Use VLOOKUP in column D.

code:
=VLOOKUP($C1,$A$1:$B$3,2)


Where $A$1:$B$3 is the range of your list of animals and values.

edit: Actually, that only works if the list of animals is in alphabetical order.

[Edited on 16-11-2009 by James_DT]
Matt H
Member

Registered: 11th Sep 01
Location: South Yorkshire
User status: Offline
16th Nov 09 at 19:33   View User's Profile U2U Member Reply With Quote

Are they dollar signs?
James_DT
Member

Registered: 9th Apr 04
Location: Cambridgeshire
User status: Offline
16th Nov 09 at 19:37   View User's Profile U2U Member Reply With Quote

Yes, but use this instead.

code:

=VLOOKUP($C1,$A$1:$B$3,2,0)


That won't need the list to be sorted.

The dollar signs just mean that Excel won't change those references if you move around the cell that the formula is in.
Matt H
Member

Registered: 11th Sep 01
Location: South Yorkshire
User status: Offline
16th Nov 09 at 19:40   View User's Profile U2U Member Reply With Quote

Thanks

Just so I understand

It looks up the value in C1 (the animal from A)
then picks the corresponding item from B (based on what number is next to it?)

What's the 2,0 for?


Sorry to be a dumbass
James_DT
Member

Registered: 9th Apr 04
Location: Cambridgeshire
User status: Offline
16th Nov 09 at 19:42   View User's Profile U2U Member Reply With Quote

It looks up the value in C1 against the list of animals and values in the A & B columns (the range A1:B3 covers both columns), and then looks at the second column in that range (which is what the 2 does, if you had a third column you could change it to a 3 and so on).
The 0 at the end just tells VLOOKUP that the list isn't sorted.
Matt H
Member

Registered: 11th Sep 01
Location: South Yorkshire
User status: Offline
16th Nov 09 at 19:48   View User's Profile U2U Member Reply With Quote

and, would this change dramatically if it were to be on a seperate workpage of a workbook?
James_DT
Member

Registered: 9th Apr 04
Location: Cambridgeshire
User status: Offline
17th Nov 09 at 00:13   View User's Profile U2U Member Reply With Quote

No, just add the worksheet that contains the data to the reference.
If the list of animals and prices is on the sheet titled Worksheet 1:
code:

=VLOOKUP(C1, 'Worksheet 1'!A1:B3, 2, 0)


Matt H
Member

Registered: 11th Sep 01
Location: South Yorkshire
User status: Offline
17th Nov 09 at 18:15   View User's Profile U2U Member Reply With Quote

Didn't work

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
f/s corsa shocks/springs purple_B Classifieds 6 202
23rd Feb 03 at 18:33
by antscorsa
 
funny BHP site......... M2RTY General Chat 22 426
24th Jun 03 at 16:18
by Sam
 
Excell Help Needed!! stubs General Chat 3 90
31st Aug 04 at 12:33
by Gareth.O
 
Visual Basic stubs Geek Day 3 721
24th Oct 06 at 10:12
by James
 
How can i edit a ".data" file? LukeS Geek Day 12 228
8th Oct 09 at 19:55
by LukeS
 

Corsa Sport » Message Board » Off Day » Geek Day » Excell help needed 29 database queries in 0.0107498 seconds