MrExcel Publishing
Your One Stop for Excel Tips & Solutions

This maybe easy, but I cannot seem to figure...

Posted by Shelley on June 07, 2001 12:24 PM

Here is an example of the problem: (Letters are coloumn headings)
Divide E column by C and multiply by D giving E
If G>F then F goes into L
If G<F then G goes into K
But both L and K have to be reduced by the difference between H and I. If there is not H and I then K increaces by the smallest amount of F or G and L increases by G.
K and L are cumulative by month.
If F does not exist then L increases by G minus H.


Posted by Barrie Davidson on June 07, 2001 1:34 PM

I don't understand your data. If the letters represent columns, why do you have "Divide E column by C and multiply by D giving E". You have the same column referenced twice.

Can you post a small sample of your data?


Posted by Shelley on June 08, 2001 4:59 AM

The result column is F not E I am sorry. This is for Child support where if they have so many children do something, but if they have two children and they come from two different dads you have to do another. I cannot give a good example besides the what I need to do with the columns because it is so complaex of an issue

Posted by Barrie Davidson on June 08, 2001 7:13 AM

Shelley, further questions (sorry but I want to be sure):
•"If G>F then F goes into L", do you mean that L=F or divide L by F?
•"If G: :But both L and K have to be reduced by the difference between H and I", do you mean if G is not greater than F you reduce L and K by the absolute difference between H and I? By absolute difference I mean it doesn't matter which one (H or I) is larger, you are only concerned with the difference.
•"If there is not H and I", what happens if there is H or (not and) I?


Posted by Joe Was on June 08, 2001 7:47 PM


Do you want all these conditions to be in one cell or are these six problems?

Are you asking for a worksheet formula or VB code?

For your first item a worksheet formula would be:
in cell F ==> =(E1/C1)*D1

Your second is a circular reference and will be flaged as bad by Excel, but you could get the answer in another cell or use tally columns off to the right of your sheet, hidden from the viewer to be referenced by column F?

The same gos for your third item?

Your forth item as well as your other items could be setup in a workbook with a data sheet and a report sheet. The report sheet could use the data on the data sheet to write a narrative based report of the above outlined data, on the report sheet as resultant data embedded in sentence structure. Like:

="The clients spouse has failed to pay child support " & Sheet1!F1 & " time in the last " & Sheet1!G1 & " years."

Which will look like:
The clients spouse hase failed to pay child support 4 times in the last 2 years.

You could write a formula to dynamically increase or decreas columns labled as months by the contents of other cells, if that is what you want?

Your last item can be in column L:

You request has a lot of poorly explained holes! Is all the data values = numbers or are some contents Text?

Are you a VB programmer?

Do you only work with sheet formulas?

Do you know how to write sheet formulas?

Thake the time to show us actual data and how your results should look, take the time to do the typing!

These statements are not to be cruel, we need to know what you want and what level to return it in!