Page 1 of 1

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

Posted: Tue Nov 26, 2024 11:46 pm
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.

Re: Help with a percentage and a visible data issue

Posted: Wed Nov 27, 2024 12:17 am
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

Re: Help with a percentage and a visible data issue

Posted: Wed Nov 27, 2024 3:15 am
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

Re: Help with a percentage and a visible data issue

Posted: Thu Nov 28, 2024 1:41 am
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.

Re: Help with a percentage and a visible data issue

Posted: Tue Dec 03, 2024 2:21 am
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%

Re: Help with a percentage and a visible data issue

Posted: Tue Dec 03, 2024 2:25 am
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"?

Re: Help with a percentage and a visible data issue

Posted: Tue Dec 03, 2024 3:27 am
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)?

Re: Help with a percentage and a visible data issue

Posted: Tue Dec 03, 2024 9:15 am
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.