[Solved] Help with a percentage and a visible data issue

Discuss the spreadsheet application
Locked
Barry G
Posts: 4
Joined: Tue Nov 26, 2024 11:25 pm

[Solved] Help with a percentage and a visible data issue

Post by Barry G »

SOLVED

1. I wish to create a percentage of life remaining on a part by basically entering a daily counter versus the part's life expectancy. I think I have it, but I would like to try to get it in reverse, meaning I want the life to countdown from 100%. I have it counting up it looks like, but just for the knowledge of it, I want to know both ways. The CURRENT METER is the daily changing number in D6. The life of item 1 is 50,000 in C10. When I changed the item is in D10. Since both meters are the same, the formula in F10 reads 100%, but you can change the CURRENT and fool around with it if you like. Is this the best way to do that formula?
2. Now if I apply that same formula to F11, I get a value without the proper data for some reason. You can see without a D11 value, it shows a percentage, but I did not change that part yet (C11). How do I make F11 blank? I tried an ISBLANK entry there I read in another post here, but I can't get it right.

This was my get-around. You all had great suggestions, so thank you. I'll need your help again in a new post about doubling a cell's value "IF" I add 2 or more components...Ill explain better in the new post. I appreciate all your help!
I added the new sample if you wish to see. Its not the same as I originally asked, but I think it will do just fine.
Attachments
Sample Calc help.ods
(12.02 KiB) Downloaded 57 times
Last edited by MrProgrammer on Tue Dec 10, 2024 5:09 pm, edited 2 times in total.
Reason: Tagged ✓ [Solved] since Barry G put SOLVED in this post -- MrProgrammer, forum moderator
Open Office 4.1.15 on Windows 10 Pro
User avatar
robleyd
Moderator
Posts: 5505
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Help with a percentage and a visible data issue

Post by robleyd »

For your second question, replace F10 with

Code: Select all

=IF(ISBLANK(D10);"";($D$6-D10)/C10)
which you can then drag down or copy as necessary. Note that I have defined D6 as an absolute reference* so it won't change when dragging or copying.

* [Tutorial] Absolute, relative and mixed references
Slackware 15 (current) 64 bit
Apache OpenOffice 4.1.16
LibreOffice 26.2.3.2; SlackBuild for 26.2.3 by Eric Hameleers
---------------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Help with a percentage and a visible data issue

Post by MrProgrammer »

Barry G wrote: Tue Nov 26, 2024 11:46 pm I wish to create a percentage of life remaining on a part by basically entering a daily counter versus the part's life expectancy.
202411261912.ods
(12.47 KiB) Downloaded 77 times
If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Help with a percentage and a visible data issue

Post by Villeroy »

Barry G wrote: Tue Nov 26, 2024 11:46 pm I wish to create a percentage of life remaining on a part by basically entering a daily counter versus the part's life expectancy.
Attachments
Life_Expectancy.ods
Life expectancy in weeks
(26.33 KiB) Downloaded 68 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Barry G
Posts: 4
Joined: Tue Nov 26, 2024 11:25 pm

Re: Help with a percentage and a visible data issue

Post by Barry G »

robleyd wrote: Wed Nov 27, 2024 12:17 am For your second question, replace F10 with

Code: Select all

=IF(ISBLANK(D10);"";($D$6-D10)/C10)
which you can then drag down or copy as necessary. Note that I have defined D6 as an absolute reference* so it won't change when dragging or copying.

* [Tutorial] Absolute, relative and mixed references
Thank you for your response.
It seems I get an Error502 with that formula when I leave D10 blank. Also, the percentage never changes...it always says 0%
Open Office 4.1.15 on Windows 10 Pro
Barry G
Posts: 4
Joined: Tue Nov 26, 2024 11:25 pm

Re: Help with a percentage and a visible data issue

Post by Barry G »

MrProgrammer wrote: Wed Nov 27, 2024 3:15 am
Barry G wrote: Tue Nov 26, 2024 11:46 pm I wish to create a percentage of life remaining on a part by basically entering a daily counter versus the part's life expectancy.
202411261912.ods

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know
Hello. Why does it show data when nothing is entered as "current"?
Open Office 4.1.15 on Windows 10 Pro
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Help with a percentage and a visible data issue

Post by MrProgrammer »

I will not have access to my OpenOffice system until Wednesday, but I suspect if nothing is entered for Current in my attachment the mileage is taken to be zero. Do you need the life expectancy to be empty if Current is empty (zero)?
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
Hagar Delest
Moderator
Posts: 33630
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Help with a percentage and a visible data issue

Post by Hagar Delest »

MrProgrammer wrote: Tue Dec 03, 2024 3:27 am Do you need the result to be empty if Current is empty (zero)?
If so, add the check on the current mileage value (in MrProgrammer file):
=IF(ISBLANK($A$2);"";(E2-$A$2)/C2)

Without that check, nothing prevents the calculation : A2=0, thus E2/C2 gives a result.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Locked