Reciprocals' Integers Equivalent Function

panyagak

Active Member
Joined
Feb 24, 2017
Messages
299
Hi Mrexcelians.

In my Weird Adventures of Maths, my project entails finding Integers when I divide 2 numbers.

But have realised, certain numbers when their Reciprocals are calculated, they make up a whole no./Integer.

Examples:
0.2495 .........gives 4.00
0.3333..........gives 3.00
0.04348........gives 23.00
0.02273........gives 44.00
Up to INTEGER below 1 billion marl

Is there a way, by code or function that may identify above examples & immediately link to its Integer Equivalent

Maths MVPs, kindly have a kook at this

Great day!!

Patrick
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
NB:
The 4th or 5th digit from the first non-zero digit counts better.

Eg. 0.033334 for 3.00; Either 3333/33334 count, as long as precision is achieved

Thanks
 
Upvote 0
Can you elaborate as to what you want? 1/0.2495 does not equal 4.
 
Upvote 0
RoryA

That Eg. was intentional: 1/0.2495 does equal 4.01 hence of no value to me.

I had in mind 0.250. The rest of eg.s are ok?

This is more of a Mathematical quizz, to solve by code or function
 
Upvote 0
Can't you just divide 1 by 1,2,3,4 etc to find the numbers you want?
 
Upvote 0
You havent understood my "difficult quizz"
With at least 26 "views" of you thread without the correct result & only one person responding with any suggestion, you don't think it could just possibly be because you haven't explained your "difficult quizz" clearly enough?
 
Upvote 0
Peter Sss

I expected few responses - Its highly Mathematical & only a Mathematician would try.

I have an additional Eg.
Key point:
"" The 4th or 5th digit from the first non- zero digit counts better.
Eg. 0.033334 for 3.00;

Either
3333/33334 count, as long as
precision is achieved""

Eg:
In sheet 1
-3.213738121200
Ok -0.031713130006 3,171,313.00
-0.281906852737
-0.361529682070

In sheet 2
-10.756700653456
Ok -0.106146995615 106,147.00
-0.943570232759
-1.210075750016

In sheet 3
=6??? -16.665793239035 6.00
-0.164457851795
-1.461911687635
-1.874819510466

(Data above may 1st be standardised to eg. 0.0166657 to accomodate various numerical representations WHILE NOTING THIS AGAIN
"" The 4th or 5th digit from the first non- zero digit counts better."""
Eg. 0.033334 for 3.00; ).

So I loop through 3 sheets from among over 100,000 rows to "smoke out" Integers": BUT in the above eg. you can see Sheet values lack an INT when manipulated BUT you can "SPOT A 6 from -16.665793239035.

What am looking for is an INTEGER IDENTIFIER WITHOUT CALCULATING A RECIPROCAL as my rows could go to nearly 150,000!!

Hope its now Understood Maths-way
 
Upvote 0
Peter Sss

I expected few responses - Its highly Mathematical & only a Mathematician would try.
I am a mathematician, though don't claim to be the world's best.

Your question is still not very clear to me and in all my mathematical career, I have not heard the expression that a digit "counts better". Perhaps it is a language issue?

In any case it sounds like you have a very large number of possible integer representations and you want to identify them without doing a division. I don't see how you could do that.
 
Upvote 0
Peter_SSs

Its true of "very large number of possible integer representations".

Actually, have figured that out & there is a "self-solution":

(1).
Create a Template & calculate all possible integer representations Eg. 1,2,3,4.....98,444 in Sheet0 in Column B.

(2).
Using a Function, Realign ALL "integer representations" in sheet1 (copy pasted as values from Sheet0), say to, 0.digits. eg. 1/2784=0.00036.... to 0.35... format

(3). Round off ALL to 5 or 4 d.p.

(4)
In sheet2, Rearrange & manipulate my data or make a copy & paste of my values to column B as I repeat (2) & (3) steps above.

(5).
My loop code focuses on column B. & am ready to go........GAGA!!

Upon Looping, any MATCH of values of Sheet1 in Sheet0 is posted to a new sheet2.

Thats it!!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top