Allocation VBA macro for Excel

I may not have time to do this myself, so I'm hoping somebody out there sees this as a small project. The attached spreadsheet also provides a description, as follows:

I need an Excel VBA macro that finds a solution for each row before moving to the next row.

Here's how it should work:

I enter an initial "Guess" and an incrementing value ("Increment") to produce a "Test Value". That Test Value is then tested in the "Solution" column, starting in the first row. The macro does NOT interact directly with the Calculation Table; instead, it acts only on columns A, B, and C. As shown in the attached spreadsheet, the Test Value is used to calculate the values in the Calculation Table (columns E through N). The sum of those values are calculated in column B in "SUM".

The Test Value in the Solution column is incremented (by the positive Increment amount) until the Sum exactly equals the Target.

When Sum = Target, then that row is completed, and the function moves to the next row. The initial Test Value in the next row is the Solution value of the prior row plus the Increment. The process is repeated again until the Sum = Target. The process then moves to the next row and repeats until all the rows are completed.

EXAMPLE of logic:

If Bx < Ax Then

Add Increment to Test_Value [repeat this iteration until Bx is NOT less than Ax]


If Bx = Ax Then

[go to next row and try Solution = (Test_Value + Increment) ]

Else [show "Error" in Solution]

Note: this "Error" should happen only if the Sum value skips over the Target (i.e., it jumps from < Target to > Target). If that happens then that means that I need to try a smaller Increment value.

PLEASE USE "GAF_problem_correct.xls"

Kemahiran: Excel, Visual Basic

Lihat lagi: excel allocation, vba allocation, vba increment column, increment column vba, allocation vba, excel vba increment column, allocation macro vba excel, macro allocation, allocation vba macro, vba excel increment row, visual basic macro increment repeat, target vba, increment row vba excel, vba excel increment column, incrementing rows excel vba, excel macro increment column, macro work allocation, excel vba row summation, vba macro guess sum function, vba excel increment value, next row vba excel, excel macro allocation, excel macro next row, excel allocation macro, excel allocation vba

Tentang Majikan:
( 1 ulasan ) Atlanta, United States

ID Projek: #283227

Dianugerahkan kepada:


Greetings! FYI, this project should take an hour to complete at the most. Also, I would also suggest having an error message show up near the "Initial Guess" and "Increment" fields, so that you don't have to sc Lagi

$30 USD dalam 3 hari
(0 Ulasan)

9 pekerja bebas membida secara purata $42 untuk pekerjaan ini


Work completed. Waiting for your bid acceptance to deliver the completed excel.

$45 USD dalam sehari
(24 Ulasan)

Looking forward to working with you.

$50 USD dalam 0 hari
(1 Ulasan)

plz view pm for my samples

$65 USD dalam sehari
(0 Ulasan)

Very simple. See PM for details

$50 USD dalam sehari
(0 Ulasan)

It's easy... Let's do it..

$48 USD dalam sehari
(0 Ulasan)

Hi, I can do this for you. Thanks

$33 USD dalam sehari
(0 Ulasan)

I'm in the US, and can start right now.

$30 USD dalam sehari
(0 Ulasan)

Very interesting problem. I want to solve it for you.

$30 USD dalam 0 hari
(0 Ulasan)