after i save my workbook and reopen it a cell with an if statement says =#VALUE!

bleeet

Board Regular
Joined
May 11, 2009
Messages
208
Office Version
  1. 2013
Platform
  1. Windows
everything works once i input the if formula in but once i close and reopen it =#VALUE! show up on the cell.

anyone happen to know what i am doing wrong?

here is the if statement in the cell

=+IF(E57="BRANCH PAYS:","*DEBITED BRANCH FOR FCT FEES OF $"&TEXT(F57,"0.00")&"",IF(E57="SWITCH-IN:","* SWITCH-IN PROMOTION CHARGED FOR FCT FEES OF $"&TEXT(F57,"0.00")&" AND DISCHARGED FEES",IF(E57="DEBT ACCOUNT:","*DEBITED CLIENT ACCOUNT FOR FCT FEES OF $"&TEXT(F57,"0.00")&"",IF(E57="SWITCH-IN BRANCH PAYS:","*SWITCH-IN CHARGED BRANCH FOR FCT FEES OF $"&TEXT(F57,"0.00")&" & DISCHARGED FEES, CLIENT CHARGED ADDITIONAL FCT FEES ",IF(AND(E57="SWITCH-IN ADDITIONAL FEES:",G54<0),"ADDITIONAL FCT FEES $"&TEXT(G60,"0.00")&" CHARGED TO CLIENT & SWITCH IN PROMO CHARGED FOR FCT FEES & DISCHARGE FEES",IF(E57="switch-in additional fees:","ADDITIONAL FCT FEES $"&TEXT(G60,"0.00")&" CHARGED TO CLIENT",IF(AND(E57="BRANCH PAYS ADDITIONAL FEES:",G54<0),"ADDITIONAL FCT FEES $"&TEXT(G60,"0.00")&" CHARGED TO BRANCH & SWITCH IN PROMO CHARGED FOR FCT FEES & DISCHARGE FEES",IF(E57="branch pays additional fees:","ADDITIONAL FCT FEES $"&TEXT(G60,"0.00")&" CHARGED TO BRANCH",""))))))))
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
see if this does it for you
Code:
Function Who_Pays_What()
    Dim Amount As Double, Amount2 As Double
    Amount = Format(Range("F57"), "$0.00")
    Amount2 = Format(Range("G60"), "$0.00")
    Who_Pays_What = "Unknown error"
    Select Case True
        Case Range("E57") = "BRANCH PAYS:"
            Who_Pays_What = "*DEBITED BRANCH FOR FCT FEES OF " & Amount & """"
            
        Case Range("E57") = "SWITCH-IN:"
            Who_Pays_What = "* SWITCH-IN PROMOTION CHARGED FOR FCT FEES OF " & Amount & " AND DISCHARGED FEES"
            
        Case Range("E57") = "DEBT ACCOUNT:"
            Who_Pays_What = "*DEBITED CLIENT ACCOUNT FOR FCT FEES OF " & Amount & """"
                    
        Case Range("E57") = "SWITCH-IN ADDITIONAL FEES:" And Range("g54") < 0
            Who_Pays_What = "ADDITIONAL FCT FEES " & Amount2 & " CHARGED TO CLIENT & SWITCH IN PROMO CHARGED FOR FCT FEES & DISCHARGE FEES"
        
        Case Range("E57") = "SWITCH-IN BRANCH PAYS:"
            Who_Pays_What = "*SWITCH-IN CHARGED BRANCH FOR FCT FEES OF " & Amount & " & DISCHARGED FEES, CLIENT CHARGED ADDITIONAL FCT FEES "
        
        Case Range("E57") = "BRANCH PAYS ADDITIONAL FEES:" And Range("g54") < 0
            Who_Pays_What = "ADDITIONAL FCT FEES " & Amount2 & " CHARGED TO BRANCH & SWITCH IN PROMO CHARGED FOR FCT FEES & DISCHARGE FEES"""
            
        Case Range("E57") = "BRANCH PAYS ADDITIONAL FEES:"
            Who_Pays_What = "ADDITIONAL FCT FEES " & Amount2 & " CHARGED TO BRANCH"
    End Select
End Function

now you can just use
Code:
=Who_Pays_What()

maybe that'll make it better.
 
Upvote 0
sorry i am not good at excel where do i put this formula

in a module?
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top