![]() |
Working with quotes
In a conditional statement, I need to code a formula that
contains quotes. I am having problems. How should I code the following? If Dues < 0# Then Worksheets("Settlement").Range("I35").Value = Dues Else Worksheets("Settlement").Range("I35").Value = _ =IF(N39="W",ROUND(H39*$H$27,2),IF(N39="G",ROUND (H39*$C$27,2),ROUND(H39*$F$27,2))) End If Thanks Mike |
Working with quotes
Squid,
Worksheets("Settlement").Range("I35").Value = _ "=IF(N39=""W"",ROUND(H39*$H$27,2),IF(N39=""G"",ROU ND (H39*$C$27,2),ROUND(H39*$F$27,2)))" John "Squid" wrote in message ... In a conditional statement, I need to code a formula that contains quotes. I am having problems. How should I code the following? If Dues < 0# Then Worksheets("Settlement").Range("I35").Value = Dues Else Worksheets("Settlement").Range("I35").Value = _ =IF(N39="W",ROUND(H39*$H$27,2),IF(N39="G",ROUND (H39*$C$27,2),ROUND(H39*$F$27,2))) End If Thanks Mike |
Working with quotes
I think I figured it out..
"=IF(N35=" & Chr(34) & "W" & Chr(34) & ",ROUND (H35*$H$27,2),IF(N35=" & Chr(34) & "G" & Chr(34) & ",ROUND (H35*$C$27,2),ROUND(H35*$F$27,2)))" -----Original Message----- In a conditional statement, I need to code a formula that contains quotes. I am having problems. How should I code the following? If Dues < 0# Then Worksheets("Settlement").Range("I35").Value = Dues Else Worksheets("Settlement").Range("I35").Value = _ =IF(N39="W",ROUND(H39*$H$27,2),IF(N39="G",ROUND (H39*$C$27,2),ROUND(H39*$F$27,2))) End If Thanks Mike . |
Working with quotes
Squid,
That'll work too, but it's easier just doubling up the quotes like I showed you in my post. John "Squid" wrote in message ... I think I figured it out.. "=IF(N35=" & Chr(34) & "W" & Chr(34) & ",ROUND (H35*$H$27,2),IF(N35=" & Chr(34) & "G" & Chr(34) & ",ROUND (H35*$C$27,2),ROUND(H35*$F$27,2)))" -----Original Message----- In a conditional statement, I need to code a formula that contains quotes. I am having problems. How should I code the following? If Dues < 0# Then Worksheets("Settlement").Range("I35").Value = Dues Else Worksheets("Settlement").Range("I35").Value = _ =IF(N39="W",ROUND(H39*$H$27,2),IF(N39="G",ROUND (H39*$C$27,2),ROUND(H39*$F$27,2))) End If Thanks Mike . |
All times are GMT +1. The time now is 02:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com