View Single Post
  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Sun, 21 Aug 2005 12:28:01 -0700, Bugaglugs
wrote:

I'm trying to write a formula which will generate a value in one cell
dependent on what the user chooses in the other. See below for example (the
worksheet is to record the charges incurred when certain rooms within a
complex are booked).
So for example if the 'blue room' is booked, the the corresponding cell in
row 2 should be prefilled with '£2500'
(Row 1) (Row 2)
Room Booked Cost of Booking
(Choices - I've used data validation)
Blue Room
Red Room
Blue Room & Red Room
Green Lounge
Whole Complex


Look at HELP for VLOOKUP.

Set up a table, perhaps including the validation choice list.

E.g. if your list is in AA1:AA5, enter the respective costs in BB1:BB5.

Then in Row2 enter a formula of the type:

=IF(Row1_cell_ref="","",VLOOKUP(Row1_cell_ref, AA1:BB5,2,FALSE)


--ron