Computing.Net > Forums > Office Software > Microsoft Excel: IF and CHOOSE

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Microsoft Excel: IF and CHOOSE

Reply to Message Icon

Name: Jeremy Millington (by sensorypulse)
Date: October 12, 2004 at 06:21:04 Pacific
OS: win xp
CPU/Ram: 256 mB RAM
Comment:

I need a bit of assistance from someone who might be an Excel whizz.

I am trying to create an Excel document that will allow me to draw up rental contracts quickly for four different apartments that we manage in La Rochelle. They are all different in rental price, so I want to do the following:

1) Set up a system whereby I can type in a number and have the programme recognise which apartment I am referring to. I have succeeded in doing this by using the =CHOOSE function, and numbering the four apartments 1, 2, 3, 4.

2) I have used one part of the sheet to type in the different prices for each apartment in a given month of the year (prices vary between apartments as they do depending on which season people want to rent). So what I want is a formula that says something to the effect of "if the apartment is 1, and the month of rental is 8, take the rental price from cell B8 (where I've put the rental price for apartment 1, month 8)"

Sounds complicated, I know, but can anyone help?

All advice gratefully received.

Thanks

Jeremy



Sponsored Link
Ads by Google

Response Number 1
Name: Bryco
Date: October 12, 2004 at 07:09:05 Pacific
Reply:

You would be better to use the VLOOKUP function in conjuction with the CONCATENATE function.

You could use the aprartment names instead of letters or numbers and you could use the month names instead of numbers too.

See the example spreadsheet by right clicking the following link and selecting "Save target as".
See the formulas in cell D3 and in column A starting at cell A6.

jeremy.xls 16Kb

I will take it off of my webspace in a couple of days or when you advise that you got a copy or that you don't want a copy.

There are many ways to accomplish what you are wanting and the above is one of them.

HTH
Bryan


0

Response Number 2
Name: Jeremy Millington (by sensorypulse)
Date: October 12, 2004 at 10:11:44 Pacific
Reply:

Bryan

Many thanks for your message and for taking the time to do me up a little spreadsheet as an example. I think you've cracked it for me.

Just one thing, which is so simple but which I'm tearing my hair out over...how did you create/name the Season table using cells A5:D29 on your example? I have tried picking Table from Data, but I'm not sure which cells to use for Row Input Cell and Column Input Cell, or indeed what these mean.

Many thanks again

Jeremy


0

Response Number 3
Name: Jeremy Millington (by sensorypulse)
Date: October 12, 2004 at 10:42:48 Pacific
Reply:

And one more question, if you don't mind...

I would like to be able to type a keyword for the apartment being booked in one cell, and in another, have the full address come up.

Is that possible, and if so, how?

So, if I type QUAIS in A1, how could I program another cell to recognise this word, and come up with the full address?

Many thanks again...much appreciated.

Jeremy


0

Response Number 4
Name: Bryco
Date: October 12, 2004 at 11:44:57 Pacific
Reply:

Re: Creating a Named Range.

There are a couple ways of doing this:
1. Select your range. Let's say (on the same spreadsheet) B5:D29 by clicking on B5 and dragging down to and include D29.

or clicking on B5, hold down the Ctrl+Shift keys and hit the right arrow and then the down arrow to make the same selection.
(You could just hit Ctrl+Shift+End but I have the information to the right of the table so that method will grab that too.)

With the data selected "B5" will be showing in the "Name Box" which is to the left of the Formula Box. Click inside the Name Box and B5 will then be highlighted/selected. Just type over it to whatever you want to name it. Let's use "Apartment" (without the quotation marks) and hit the Enter key.
Done.

2. Select your range and then go to Insert, Name, Define.
Let's use C5:D29
Once you open the Define Dialog box it will already be showing the column label's name of "Month" but you can call it anything you like. Just type over it.

You don't have to pre-select your range; you can define it in this same box at the bottom.

I used the first method because it is quicker.

Now anytime you refer to any of those named ranges within a formula you won't have to type in cell references to that range; just it's name instead.

To see the named ranges in your entire spreadsheet just click on the drop down button for the Name Box. If you click on one of them in that box it will select that range.

Re: Addresses.
Same way using just the VLOOKUP.

See the revised Spreadsheet. Do note that the formula in each cell refers to different column number to the right of the cell you are looking up.

jeremy.xls 16.5Kb

Excel's help file has good info on the VLOOKUP function. It is very powerful.

You are welcome,
Bryan


0

Response Number 5
Name: Bryco
Date: October 25, 2004 at 05:42:48 Pacific
Reply:

I removed the .xls file from my webspace.

Bryan


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Microsoft Excel: IF and CHOOSE

Microsoft Excel IF Statement www.computing.net/answers/office/microsoft-excel-if-statement/4444.html

Excel If/And Statements www.computing.net/answers/office/excel-ifand-statements/8163.html

Excel nesting AND and If formulars www.computing.net/answers/office/excel-nesting-and-and-if-formulars/9454.html