Hello all!
My name is Joe and I have a complex problem to solve that may prove a nice challenge for some of you excelperts!
I have a document that I use to generate contracts by importing information from another program. But I would like it to do more.
More on this Document Here: http://www.mrexcel.com/forum/excel-...ng-between-two-excel-sheets-out-setnames.html
And Here: http://www.mrexcel.com/forum/excel-questions/949429-otherworkbook-function.html
As of now there is a charge that applys in most situation in different ways depending on the customer and items delivered to them that I need to manually calculate.
Here’s as close to a plain English explanation of whats going on that I can muster.
This document has information imported into it so it’s different every time it gets ran. It is a template for creating contracts for customers. There are multiple rows (of varying quantity) of items we provide to our customers. We charge a fee to maintain certain items. Those Items are represented by a certain class (R22:102). If there are none of the classes that get charged are present the maintain inventory fee line is removed (first IF above). If not the min charge (Column M) for each of those items needs to be totaled and multiplied by a percentage that changes from customer to customer (the Code identifying what percentage to use lives in (R103)) Below is what I think it should look like except for the parts where I have no stinkin clue how to word it.
Thanks In advance!
Joe.
My name is Joe and I have a complex problem to solve that may prove a nice challenge for some of you excelperts!
I have a document that I use to generate contracts by importing information from another program. But I would like it to do more.
More on this Document Here: http://www.mrexcel.com/forum/excel-...ng-between-two-excel-sheets-out-setnames.html
And Here: http://www.mrexcel.com/forum/excel-questions/949429-otherworkbook-function.html
As of now there is a charge that applys in most situation in different ways depending on the customer and items delivered to them that I need to manually calculate.
Here’s as close to a plain English explanation of whats going on that I can muster.
This document has information imported into it so it’s different every time it gets ran. It is a template for creating contracts for customers. There are multiple rows (of varying quantity) of items we provide to our customers. We charge a fee to maintain certain items. Those Items are represented by a certain class (R22:102). If there are none of the classes that get charged are present the maintain inventory fee line is removed (first IF above). If not the min charge (Column M) for each of those items needs to be totaled and multiplied by a percentage that changes from customer to customer (the Code identifying what percentage to use lives in (R103)) Below is what I think it should look like except for the parts where I have no stinkin clue how to word it.
Code:
[B]If WorksheetFunction.CountIf(Range("Q22:Q102"), "4") = 0 Then
Range("A103").EntireRow.Delete
Else
Foreach Cell in Range(“R22:R102”)
If Cell.Value = “07”, “09”, “11”, “12”, “13”, “14” Then[/B]
[I]Take the value in column M in each row and add it to some grand total (maybe off in cell S1).[/I]
[I]THEN take that total and multiply it by a percentage determined by a number in[/I] R103.
[I]Here is kindof how I see that:
[/I]
[B]If Range(“R103”).Cell.Value = 02 Then[/B]
[I] Multiply that grand total by 2%[/I]
[B]Elseif Range(“R103”).Cell.Value = 03 Then[/B]
[I] By 3%[/I]
[B]Elseif Range(“R103”).Cell.Value = 04 Then[/B]
[I] By 5%[/I]
[B]Elseif Range(“R103”).Cell.Value = 05 Then[/B]
[I] By 5%[/I]
[B]Elseif Range(“R103”).Cell.Value = 06 Then[/B]
[I] By 6%[/I]
[B]Elseif Range(“R103”).Cell.Value = 08 Then[/B]
[I] By 8%[/I]
([B]Elseif Range(“R103”).Cell.Value = 09 Then[/B]
[I] By 3%) [U]this one can only apply to “14” and “09” above.[/U][/I]
[B]Elseif Range(“R103”).Cell.Value = 4A Then[/B]
[I] By 4%
[/I]
[I]And finaly That result needs to live in cell (M103)
[/I]
Thanks In advance!
Joe.