christianbiker
Active Member
- Joined
- Feb 3, 2006
- Messages
- 379
Howdy,
I am using the below code, to which I have added an if/then statement but I am not getting the results I expect and I'm not sure why. The issue relates to this part of the code:
If appealreopening.Value = "Appeal" Then Range("B" & lr).Value = PON.Value & " (" & appealreopening.Value & ")" Else
.Range("B" & lr).Value = PON.Value
During my testing the appealreopening value is "Appeal" yet the code is not adding "Appeal" to the end of the PON.value. As I said, no errors but clearly something is incorrect.
Thanks in advance for any assistance!!!
I am using the below code, to which I have added an if/then statement but I am not getting the results I expect and I'm not sure why. The issue relates to this part of the code:
If appealreopening.Value = "Appeal" Then Range("B" & lr).Value = PON.Value & " (" & appealreopening.Value & ")" Else
.Range("B" & lr).Value = PON.Value
During my testing the appealreopening value is "Appeal" yet the code is not adding "Appeal" to the end of the PON.value. As I said, no errors but clearly something is incorrect.
VBA Code:
With Sheets("MAIN")
'copy and pasted into "Sheet2" on the last row without text.
lr = .Range("A" & Rows.Count).End(3).Row + 1
.Range("A" & lr).Value = Disclosure.Value
If appealreopening.Value = "Appeal" Then Range("B" & lr).Value = PON.Value & " (" & appealreopening.Value & ")" Else
.Range("B" & lr).Value = PON.Value
.Range("C" & lr).Value = NoticeType.Value
.Range("D" & lr).Value = Served.Value
.Range("E" & lr).Value = Officer.Value
.Range("F" & lr).Value = OffenceDate.Value
.Range("G" & lr).Value = Defendant.Value
.Range("H" & lr).Value = Legislation.Value
.Range("I" & lr).Value = Section.Value
.Range("L" & lr).Value = CourtDate.Value
.Range("M" & lr).Value = AppearanceType.Value
.Range("N" & lr).Value = CourtLocation.Value
.Range("O" & lr).Value = TierTime.Value
.Range("CT" & lr).Value = ChargeType.Value
.Range("CU" & lr).Value = Legislation.Value
.Range("CV" & lr).Value = Section & " " & OffenceWording.Value
End With
Thanks in advance for any assistance!!!