+ Reply to Thread
Results 1 to 3 of 3

Urgent problem needs help in solving

  1. #1
    Registered User
    Join Date
    02-02-2006
    Posts
    2

    Urgent problem needs help in solving

    I was given 10 numbers from A1-A10 (all are integers). Say they are represented as a1, a2, a3 .... a10.

    Tasks and Conditions

    1. Need to generate a further 5 columns of random numbers (from column B
    to F) and say again the numbers are represented as b1, b2 ... b10 for
    column B and respectively for columns C to F.

    2. The random numbers generated for each column must be:-

    i) Mathematically,

    b1 =>a1-10 and also
    b1 =< a1+10
    (b1 must be equal or more than a1 minus 10 and equal or less than a1 plus 10)

    b2 =>a2-10
    b2 =< a2+10

    and the same condition applies to c1-c10 ..... f1-f10

    ii) g1 (which is the average number from the random numbers generated from
    b1-f1) should be equal to a1. The same applies again for g2-g10.

    iii) g1-g10 can be integers or non-integers.

    This looks like a simple problem but I am new to Excel and not familiar with VB programming at all. I would think this is a few lines of programming and any help regarding this matter is greatly appreciated as this is really urgent. Thanx in advance.

  2. #2
    Gary''s Student
    Guest

    RE: Urgent problem needs help in solving

    You don't need VBA:

    In B1 put =RANDBETWEEN(A1+10,A1-10) and fill in B2 thru F10 in a similar
    fashion.
    In G1 put =AVERAGE(B1:F1) and fill G2 thru G10, etc.
    --
    Gary's Student


    "copu2000" wrote:

    >
    > I was given 10 numbers from A1-A10 (all are integers). Say they are
    > represented as a1, a2, a3 .... a10.
    >
    > _*-Tasks_and_Conditions-*_
    >
    > 1. Need to generate a further 5 columns of random numbers (from column
    > B
    > to F) and say again the numbers are represented as b1, b2 ... b10
    > for
    > column B and respectively for columns C to F.
    >
    > 2. The random numbers generated for each column must be:-
    >
    > i) Mathematically,
    >
    > b1 =>a1-10 and also
    > b1 =< a1+10
    > (b1 must be equal or more than a1 minus 10 and equal or less than a1
    > plus 10)
    >
    > b2 =>a2-10
    > b2 =< a2+10
    >
    > and the same condition applies to c1-c10 ..... f1-f10
    >
    > ii) g1 (which is the average number from the random numbers generated
    > from
    > b1-f1) should be equal to a1. The same applies again for g2-g10.
    >
    > iii) g1-g10 can be integers or non-integers.
    >
    > This looks like a simple problem but I am new to Excel and not familiar
    > with VB programming at all. I would think this is a few lines of
    > programming and any help regarding this matter is greatly appreciated
    > as this is really urgent. Thanx in advance.
    >
    >
    > --
    > copu2000
    > ------------------------------------------------------------------------
    > copu2000's Profile: http://www.excelforum.com/member.php...o&userid=31112
    > View this thread: http://www.excelforum.com/showthread...hreadid=507778
    >
    >


  3. #3
    Toppers
    Guest

    RE: Urgent problem needs help in solving

    Further to Gary's solution:

    If G1=A1 then in F1 put =A1*5-SUM(B1:E1) and copy down.

    "Gary''s Student" wrote:

    > You don't need VBA:
    >
    > In B1 put =RANDBETWEEN(A1+10,A1-10) and fill in B2 thru F10 in a similar
    > fashion.
    > In G1 put =AVERAGE(B1:F1) and fill G2 thru G10, etc.
    > --
    > Gary's Student
    >
    >
    > "copu2000" wrote:
    >
    > >
    > > I was given 10 numbers from A1-A10 (all are integers). Say they are
    > > represented as a1, a2, a3 .... a10.
    > >
    > > _*-Tasks_and_Conditions-*_
    > >
    > > 1. Need to generate a further 5 columns of random numbers (from column
    > > B
    > > to F) and say again the numbers are represented as b1, b2 ... b10
    > > for
    > > column B and respectively for columns C to F.
    > >
    > > 2. The random numbers generated for each column must be:-
    > >
    > > i) Mathematically,
    > >
    > > b1 =>a1-10 and also
    > > b1 =< a1+10
    > > (b1 must be equal or more than a1 minus 10 and equal or less than a1
    > > plus 10)
    > >
    > > b2 =>a2-10
    > > b2 =< a2+10
    > >
    > > and the same condition applies to c1-c10 ..... f1-f10
    > >
    > > ii) g1 (which is the average number from the random numbers generated
    > > from
    > > b1-f1) should be equal to a1. The same applies again for g2-g10.
    > >
    > > iii) g1-g10 can be integers or non-integers.
    > >
    > > This looks like a simple problem but I am new to Excel and not familiar
    > > with VB programming at all. I would think this is a few lines of
    > > programming and any help regarding this matter is greatly appreciated
    > > as this is really urgent. Thanx in advance.
    > >
    > >
    > > --
    > > copu2000
    > > ------------------------------------------------------------------------
    > > copu2000's Profile: http://www.excelforum.com/member.php...o&userid=31112
    > > View this thread: http://www.excelforum.com/showthread...hreadid=507778
    > >
    > >


+ 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