total newbie has Calc question

classic Classic list List threaded Threaded
3 messages Options
mamba_lev mamba_lev
Reply | Threaded
Open this post in threaded view
|

total newbie has Calc question

hello, and thank you for taking the time to read my question, i'll try to be
concise but i'm so new to using the program that i'm not sure of exactly how
to ask or what language to use.

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
arangments) 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?

thank you again for your time and any help will be greatly appreciated



--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Users-f1639498.html

--
To unsubscribe e-mail to: [hidden email]
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/
Privacy Policy: https://www.documentfoundation.org/privacy

T. R. Valentine T. R. Valentine
Reply | Threaded
Open this post in threaded view
|

Re: total newbie has Calc question

On Wed, 23 Sep 2020 at 03:04, mamba_lev <[hidden email]> 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
> arangments) 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?

If Column 'C' is to have the 'A' or 'B' or 'S' and starting row 5
(randomly picked, figuring there will labels above and to the left).

If C5 is waiting for the letter entry and the formula to appear in
cell D5 the most basic formula would be
=IF(C5="A",50,IF(C5="B",60,""))
This will result in a blank unless C5 has an 'A' or 'B'.

You can expand a bit to
=IF(C5="A",50,IF(C5="B",60,IF(C5="S","")))
This will result in a FALSE if C5 has anything other than 'A' or 'B'
or 'S', including a blank cell (good for catching errors).

If you only want a FALSE to appear when something other than 'A' or
'B' or 'S' is entered, not including a blank cell:
=IF(C5="","",IF(C5="A",50,IF(C5="B",60,IF(C5="S",""))))


Once you have the formula you want, it can be copied to other cells.



--
T. R. Valentine
A rich heart may be under a poor coat.

--
To unsubscribe e-mail to: [hidden email]
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/
Privacy Policy: https://www.documentfoundation.org/privacy
Brian Barker Brian Barker
Reply | Threaded
Open this post in threaded view
|

Re: total newbie has Calc question

In reply to this post by mamba_lev
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: [hidden email]
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/
Privacy Policy: https://www.documentfoundation.org/privacy