Thread: @if question
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Billy Liddel Billy Liddel is offline
external usenet poster
 
Posts: 527
Default @if question

I created a simple spreadsheet to test, perhaps you can change the ranges to
suit. The data is below:

Date Person Expences Repay
01/02/2008 Fred 500 500
02/02/2008 Sally 300 300
03/02/2008 Fred 700 1060
04/02/2008 Dave 1200 1060
05/02/2008 Fred 250 1260
06/02/2008 Fred 200 1420
07/02/2008 Fred 400 1500
08/02/2008 Fred 500 1500
09/02/2008 Sally 300 580
10/02/2008 Sally 1200 1500

The formula for repayment in D2 is:
=IF(SUMIF($B$2:B2,B2,$C$2:C$2)<=500,SUMIF($B$2:B2, B2,$C$2:C2)*1,IF(SUMIF($B$2:B2,B2,$C$2:C2)<=1750,( SUMIF($B$2:B2,B2,$C$2:C2)-500)*0.8+500,1500))

And this was copied down.

If the sheet layout is different, apart from the extra columns and you want
only one figure per person change $B$2:b2 to B2:B5000 and $C$2:C2 to C2:C5000
to increase the range

Regards
Peter

"MrsGixxer" wrote:

I have a spreadsheet that I am creating that I would like to auto calculate
except for a few cells. This is the jist of what is happening. We pay 100%
the first $500 of an expense. After the first $500 we pay 80% of the next
$1250. I am tracking these expenses for each person. I would like to only
have to enter the expense amount and then nothing else. I have created most
of the spreadsheet but am having problems with the 80% part of it. I have a
formula that works for the very first time the 80% is used but am stumped
after that. This is the formuala I have that doesn't work past the first
time. =IF(G10+B11<=$C$5,(B11*G4),0)

G10 being the total of previous expenses
B11 being the new expense
C5 being the total expenses allowed for reimbursement ($1740)
G4 being 80%

I would like to add an "and" to the formula but am not sure if that is
possible.

Hopefully I made sense. Any help would be greatly appreciated.