Help using the 'If' function to automatically fill in other cells

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

Guest

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
 
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
 
Thanks very much for your prompt response - I hadn't heard of the VLOOKUP
function before (am very much learning by trial and error as I go along).
I'll have a look at the suggested website.
 
Back
Top