Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8680909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:22:09+00:00 2026-06-12T21:22:09+00:00

I’m trying to write formulae that will split a given number into the sum

  • 0

I’m trying to write formulae that will split a given number into the sum of 4 other numbers.

The other numbers are 100,150,170 and 200 so the formula would be
x = a*100+b*150+c*170+d*200 where x is the given number and a,b,c,d are integers.

My spreadsheet is set up as where col B are x values, and C,D,E,F are a,b,c,d respectively (see below).

   B  |  C  |  D  |  E  |  F  |
  100    1     0     0     0
  150    0     1     0     0   
  200    0     0     0     1  
  250    1     1     0     0  
  370    0     0     1     1   
  400    0     0     0     2 

I need formulae for columns C,D,E,F (which are a,b,c,d in the formula)

Your help is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:22:10+00:00Added an answer on June 12, 2026 at 9:22 pm

    UPDATE:

    Based on the research below, for input numbers greater than 730 and/or for all actually divisible input numbers use the following formulas:

    100s: =CHOOSE(MOD(ROUNDUP([@number]/10;0); 20)+1;
           0;1;1;0;1;1;0;1;0;0;1;0;0;1;0;0;1;0;1;1)
    150s: =CHOOSE(MOD(ROUNDUP([@number]/10;0); 10)+1;
           0;0;1;1;0;1;1;0;0;1)
    170s: =CHOOSE(MOD(ROUNDUP([@number]/10;0); 5)+1;
           0;3;1;4;2)
    200s: =CEILING(([@number]-930)/200;1) + 
           CHOOSE(MOD(ROUNDUP([@number]/10;0); 20)+1;
           4;1;2;0;2;3;1;3;1;2;4;2;3;0;2;3;0;3;0;1)
    
    • MOD(x; 20) will return numbers 0 – 19, CHOOSE(x;a;b;...) will return n-th argument based on the first argument (1=>second argument, …)
    • see more info about CHOOSE
    • use , instead of ; based on your Windows language&region settings

    let’s start with the assumption that you want to preferably use 200s over 170s over 150s over 100s – i.e. 300=200+100 instead of 300=2*150 and follow the logical conclusions:

    1. the result set can only contain at most 1 100, at most 1 150, at most 4 170s and unlimited number of 200s (i started with 9 170s because 1700=8×200+100, but in reality there were at most 4)

    2. there are only 20 possible subsets of (100s, 150s, 170s) – 2*2*5 options

    3. 930 is the largest input number without any 200s in the result set

    4. based on observation of the data points, the subset repeats periodically for

      number = 740*k + 10*l, k>1, l>0 – i’m not an expert on reverse-guessing on periodic functions from data, but here is my work in progress (charted data points are from the table at the bottom of this answer)

    periodic functions for denominations

    • the functions are probably more complicated, if i manage to get them right, i’ll update the answer

    • anyway for numbers smaller than 740, more tweaking of the formulas or a lookup table are needed (e.g. there is no way to get 730, so the result should be the same as for 740)


    Here is my solution based on lookup formulas:
    match+index formulas

    Following is the python script i used to generate the data points, formulas from the picture and the 60-row table itself in csv format (sorted as needed by the match function):

    headers = ("100s", "150s", "170s", "200s")
    table = {}
    for c200 in range(30, -1, -1):
        for c170 in range(9, -1, -1):
            for c150 in range(1, -1, -1):
                for c100 in range(1, -1, -1):
                    nr = 200*c200 + 170*c170 + 150*c150 + 100*c100
                    if nr not in table and nr <= 6000:
                        table[nr] = (c100, c150, c170, c200)
    print("number\t" + "\t".join(headers))
    for r in sorted(table):
        c100, c150, c170, c200 = table[r]
        print("{:6}\t{:2}\t{:2}\t{:2}\t{:2}".format(r, c100, c150, c170, c200))
    __________
    
    =IF(E$1<740; 0; INT((E$1-740)/200))
    =E$1 - E$2*200
    =MATCH(E$3; table[number]; -1)
    =INDEX(table[number]; E$4)
    =INDEX(table[100s]; E$4)
    =INDEX(table[150s]; E$4)
    =INDEX(table[170s]; E$4)
    =INDEX(table[200s]; E$4) + E$2
    __________
    
    number,100s,150s,170s,200s
    940,0,0,2,3
    930,1,1,4,0
    920,0,1,1,3
    910,0,0,3,2
    900,1,0,0,4
    890,0,1,2,2
    880,0,0,4,1
    870,1,0,1,3
    860,0,1,3,1
    850,1,1,0,3
    840,1,0,2,2
    830,0,1,4,0
    820,1,1,1,2
    810,1,0,3,1
    800,0,0,0,4
    790,1,1,2,1
    780,1,0,4,0
    770,0,0,1,3
    760,1,1,3,0
    750,0,1,0,3
    740,0,0,2,2
    720,0,1,1,2
    710,0,0,3,1
    700,1,0,0,3
    690,0,1,2,1
    680,0,0,4,0
    670,1,0,1,2
    660,0,1,3,0
    650,1,1,0,2
    640,1,0,2,1
    620,1,1,1,1
    610,1,0,3,0
    600,0,0,0,3
    590,1,1,2,0
    570,0,0,1,2
    550,0,1,0,2
    540,0,0,2,1
    520,0,1,1,1
    510,0,0,3,0
    500,1,0,0,2
    490,0,1,2,0
    470,1,0,1,1
    450,1,1,0,1
    440,1,0,2,0
    420,1,1,1,0
    400,0,0,0,2
    370,0,0,1,1
    350,0,1,0,1
    340,0,0,2,0
    320,0,1,1,0
    300,1,0,0,1
    270,1,0,1,0
    250,1,1,0,0
    200,0,0,0,1
    170,0,0,1,0
    150,0,1,0,0
    100,1,0,0,0
    0,0,0,0,0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.