+ Reply to Thread
Results 1 to 5 of 5

Figuring out a number that satisfies a certain formula

  1. #1
    Registered User
    Join Date
    09-30-2009
    Location
    Earth
    MS-Off Ver
    Excel 2003
    Posts
    2

    Figuring out a number that satisfies a certain formula

    I've done this before in excel, but I don't remember what it is called, but it works something like this.

    Let's say you are trying to figure out the lowest integer (other than 1) that will divide into another integer without a remainder.

    For example, the lowest integer that will divide into a 9 without a remainder is a 3.

    So, let's say I'm trying to do this in excel. I have three cells.

    cell_A = the number I am dividing into. In the above example this number would be a 9.

    cell_B = the number I am trying to figure out. In the above example, this number is 3.

    cell_C = cell_A / cell_B, such that the result of this formula does not give a remainder... mod(cell_A / cell_B) = 0.

    How do I formulate cell_B so that cell_C meets the above condition.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Figuring out a number that satisfies a certain formula

    If we assume that A1 is 9 then

    Please Login or Register  to view this content.
    above is c/o daddylonglegs (I think?)

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Figuring out a number that satisfies a certain formula

    Or =MATCH(TRUE, MOD(A1, ROW(INDIRECT("2:" & INT(SQRT(A1) ) ) ) ) = 0, 0) + 1

    Returns #N/A for primes.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    09-30-2009
    Location
    Earth
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Figuring out a number that satisfies a certain formula

    I tried those two formulas... didn't work, perhaps because I mis-typed something or whatever... but these are not what I had in mind because they are both trying to solve for the number with some sort of a direct formula based on A1.

    What I have in mind is something like a solver that will solve for B1 based on a certain condition on C1 which is mod(A1,B1) has to be 0.

    I remember doing something like this a while ago but can't recall exactly what I did.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Figuring out a number that satisfies a certain formula

    Both are array formulas.

    Paste the formula in the formula bar, press and hold the Ctrl and Shift keys, then press Enter.

    Enter 108163 in A1, and the cell where the formula is will show 11

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1