[Solved] Formula for percent, how do I do ?

Discuss the spreadsheet application
Post Reply
PeterGsson
Posts: 14
Joined: Wed May 14, 2014 7:51 am
Location: Sweden, Örnsköldsviks kommun

[Solved] Formula for percent, how do I do ?

Post by PeterGsson »

Hi.
I would be grateful for help with a problem I have in Open Office Calc.

Windows 11 and OpenOffice 4.1.7

In one sheet I have product names in their own cells, and also associated purchase prices for me from my supplier, also in their own cells.
On another sheet I have the same products, but there, I want to be able to "play" with numbers in ONE cell where I should be able to change the number, to be able to obtain the right sales price on all products individually.

Example:
On sheet 1, one product has a price cell with a purchase price of 100.
On sheet 2, this product has a price cell that is now empty.
On sheet 2 I also have another cell where I want to be able to change the number so that the cell with the sales price changes accordingly.
Putting 100 (%) in the cell will give the price-cell 100, puting 150 (%) in the cell will give the price-cell 150, and so on.

Hope you understand the question.
I have been trying for five hours now, but can not find the right formula.

Very grateful for all the help.

Regards
Peter
Last edited by Hagar Delest on Sun Nov 14, 2021 10:39 am, edited 1 time in total.
Reason: Tagged [Solved].
FJCC
Moderator
Posts: 9654
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Formula for percent, how do I do ?

Post by FJCC »

The attached file has an example of one way to do this. Products can be entered in any order on Sheet2 and the price from Sheet1 is incremented by the percentage shown in D2.
Attachments
PercentIncrease.ods
(9.09 KiB) Downloaded 217 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
PeterGsson
Posts: 14
Joined: Wed May 14, 2014 7:51 am
Location: Sweden, Örnsköldsviks kommun

Re: Formula for percent, how do I do ?

Post by PeterGsson »

Thanks for your reply FJCC, but it's calculating incorrectly.
One price in sheet 1 is 100, the ratio in sheet 2 is 100%, then the incremented price should be 200, right?
Now its 251.

Peter
Open Office: 4.1.7
Windows 11
FJCC
Moderator
Posts: 9654
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Formula for percent, how do I do ?

Post by FJCC »

Let's make sure I understand what you want. I your first post you said
PeterGsson wrote:Putting 100 (%) in the cell will give the price-cell 100
Do you want the number on Sheet2 to be the ratio between the price on Sheet1 and the price on Sheet2, as the above quote implies, or do you want the number on Sheet2 to represent the increase, so that 100% doubles the price?
Do you want the products on Sheet2 to be listed in the same order as they are shown on Sheet1? I set up the formula so that the order on Sheet2 can be different, and is, in fact, different. If the order is the same, the formula can be simplified.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
PeterGsson
Posts: 14
Joined: Wed May 14, 2014 7:51 am
Location: Sweden, Örnsköldsviks kommun

Re: Formula for percent, how do I do ?

Post by PeterGsson »

Hi again and thanks FJCC.

My mother tongue is not English, so I suspected that my explanation could be misunderstood, I apologize for that.

Yes, exactly, I want the numbers on Sheet2 to represent the increase, so that 100% doubles the price?

I want to be able to put the formula in each price cells on sheet 2, independently from the order they are shown on Sheet1, so that it is related to the prices in sheet 1, and changes when I change the Ratio.

I therefore do not think it needs to be as complicated as your first suggestion.

Peter
Open Office: 4.1.7
Windows 11
FJCC
Moderator
Posts: 9654
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Formula for percent, how do I do ?

Post by FJCC »

The formula in B2 of Sheet2 can be

Code: Select all

=VLOOKUP(A2;$Sheet1.$A$2:$B$6;2;0)*(1+$D$2)
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
PeterGsson
Posts: 14
Joined: Wed May 14, 2014 7:51 am
Location: Sweden, Örnsköldsviks kommun

Re: Formula for percent, how do I do ?

Post by PeterGsson »

Sorry, but that give me an error in that cell, in B2 of Sheet2 #NAMN?

Peter
Open Office: 4.1.7
Windows 11
FJCC
Moderator
Posts: 9654
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Formula for percent, how do I do ?

Post by FJCC »

Here is the file with that formula
Attachments
PercentIncrease.ods
(9.72 KiB) Downloaded 221 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
PeterGsson
Posts: 14
Joined: Wed May 14, 2014 7:51 am
Location: Sweden, Örnsköldsviks kommun

Re: Formula for percent, how do I do ?

Post by PeterGsson »

Hmmm, could it be some configuration problem in my program/computer ?

Or did you send me your first file again ?

I downloaded your last file and opened it.
Sheet 1, cell B2 is 100.
Ratio is 50,00%.
Sheet 2, cell B2 is showing 376,5

Formula in Sheet 2, cell B2 is this: =LETARAD(A2;$Sheet1.$A$2:$B$6;2;0)*(1+$D$2)

Peter
Open Office: 4.1.7
Windows 11
FJCC
Moderator
Posts: 9654
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Formula for percent, how do I do ?

Post by FJCC »

On Sheet2, A2 = D.
On Sheet1, A4 = D and B4 = 251.
On Sheet2, B2 = 251 * 1,5 = 376,5

The order of the product names on Sheet2 is not the same as the order on Sheet1.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
PeterGsson
Posts: 14
Joined: Wed May 14, 2014 7:51 am
Location: Sweden, Örnsköldsviks kommun

Re: Formula for percent, how do I do ?

Post by PeterGsson »

Thanks for trying to help me, I really appreciate it.

But, I dont understand why you are talking about and relates to the product names.
Is there no easier formula where you only use the price cells ?
Then I can only change the formula so that it fits each cell, I only have 12 products / prices.
I'm not familiar enough with this to be able to transfer your formula to my Spreadsheet, I don't understand it.

Peter
Open Office: 4.1.7
Windows 11
FJCC
Moderator
Posts: 9654
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Formula for percent, how do I do ?

Post by FJCC »

In B2 of Sheet2, you can use

Code: Select all

=Sheet1.B2*(1+$D$2)
That calculates the increase for the B2 cell of Sheet1 as determined by the value in Sheet2.D2.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
PeterGsson
Posts: 14
Joined: Wed May 14, 2014 7:51 am
Location: Sweden, Örnsköldsviks kommun

Re: Formula for percent, how do I do ?

Post by PeterGsson »

Thanks.

The last formula, =Sheet1.B2*(1+$D$2) also gave me an error, but my program suggested a small change to this: ='Sheet1'.B2*(1+$D$2) and then it worked.

Thanks for your time and help.

Peter
Open Office: 4.1.7
Windows 11
User avatar
Lupp
Volunteer
Posts: 3761
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Formula for percent, how do I do ?

Post by Lupp »

PeterGsson wrote:... =Sheet1.B2*(1+$D$2) also gave me an error, but my program suggested a small change to this: ='Sheet1'.B2*(1+$D$2) ...
I bet, your actual sheet-name wasn't "Sheet1" but some string starting with a digit or/and containg spaces or/and containing special characters basically not allowed in sheet-names.
Many clever spreadsheet users only assign clean names to avoid the need of the escaping apostrophes.
I would suggest you also do so.
A clean name needs to start with a letter and to continue with zero or more letters, digits and underscores. No spaces, no special chartacters!
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
PeterGsson
Posts: 14
Joined: Wed May 14, 2014 7:51 am
Location: Sweden, Örnsköldsviks kommun

Re: [Solved] Formula for percent, how do I do ?

Post by PeterGsson »

I only used letters, both uppercase and lowercase.
Three short words and thus 2 spaces.
The first and the third word started with uppercase letters.
Open Office: 4.1.7
Windows 11
User avatar
RoryOF
Moderator
Posts: 35268
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Formula for percent, how do I do ?

Post by RoryOF »

Not with specific reference to this particular situation (of which I have no experience), it can be helpful to form names using capital letters on keywords, and replacing spaces with underscores.
Apache OpenOffice 4.1.17 on Xubuntu 26.04.1 LTS
PeterGsson
Posts: 14
Joined: Wed May 14, 2014 7:51 am
Location: Sweden, Örnsköldsviks kommun

Re: [Solved] Formula for percent, how do I do ?

Post by PeterGsson »

OK, thanks.
Open Office: 4.1.7
Windows 11
Post Reply