2020 Archives by date, by thread · List index

# Re: [libreoffice-users] total newbie has Calc question

```At 19:04 22/09/2020 -0700, Mamba Lev wrote:
```
I'm putting together an annual rent report for the shared house i live in, due to varying room sizes there are two rent brackets (60/week for small rooms, 70/week for large) we also have one resident paying a third amount as part of an arrangement we have where he is doing some work for us.
```
```
what i would like to be able to do is represent each rent bracket with a letter (eg "A" for small rooms, "B" for large and "S" for special arrangements) and by inputting that letter in to a cell i would like another cell to be populated with the total amount they owe in rent per year (or to be left blank in the case of the special arrangement). would this be possible and if so, how would i go about it?
```
This is fairly straightforward.

```
o Create a table of the values that you want to use. The first column of the table would have the code letters, A, B, and S, and the second column the corresponding values - with the cell against "S" being blank. This table can be out of the way of the main part of the spreadsheet, perhaps on a separate sheet or excluded from printing by the use of a Print Range, so that it will not appear on your printed report.
```
```
o In the cells where you require the rent value to appear, you need to use the VLOOKUP() function, referring to the table you have created. Let's imagine that you are inputting the code letters into column A and you require the values to appear in column B, and that the table you have created is in rows 1 to 3 of columns K and L. Then enter
```=VLOOKUP(A1;K\$1:L\$3;2;0)
```
into B1 and fill that down the column. This function searches the first column of the table at K1:L3 for the value in A1 (or A2 and so on) and returns the corresponding value in the second column. If there is no match, it returns the error "Value Not Available", which appears as "#N/A".
```
I trust this helps.

Brian Barker

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/