SomethingNew
New Member
- Joined
- Jul 2, 2024
- Messages
- 4
- Office Version
- 2016
- Prefer Not To Say
- Platform
- Windows
- Web
I don't know why it's not working honestly, I assumed it was in case the cell has no value or is blank and that's why it won't run but I'm not sure.
Posting almost my whole script because I'm not sure if it's really the sumValue that is the problem or did I break a rule somewhere:
The rest of the script is basically:
Sheets(ws_output).Cells(next_row, 1).Resize(NoOfRows).Value = Range("DESCRIPTION").Value
Dim sumValue As Double
or
Sheets(ws_output).Cells(next_row, 24).Value = Range("SITE").Value
Posting almost my whole script because I'm not sure if it's really the sumValue that is the problem or did I break a rule somewhere:
VBA Code:
sumValue = Range("CUSTOMS").Value + Range("LOCAL_CHARGES").Value + Range("EXPORT_COST").Value
next_row = Sheets(ws_output).Range("B" & Rows.Count).End(xlUp).Offset(1).Row
If IsEmpty(Range("DOLLAR").Value) Or Range("DOLLAR").Value = "" Then
Sheets(ws_output).Cells(next_row, 31).Value = Range("PESO_COST").Value
Else
Sheets(ws_output).Cells(next_row, 29).Value = Range("DOLLAR").Value
Sheets(ws_output).Cells(next_row, 30).Value = Range("RATE").Value
End If
If IsEmpty(Range("DOLLAR").Value) Or Range("DOLLAR").Value = "" Then
Sheets(ws_output).Cells(next_row, 35).Value = Range("PP_INPUT_VAT").Value
Else
Sheets(ws_output).Cells(next_row, 35).Value = Range("CDT_INPUTVAT").Value
End If
Sheets(ws_output).Cells(next_row, 40).Value = Range("CHARGES_BROKER").Value
Sheets(ws_output).Cells(next_row, 41).Value = Range("CHARGES_INPUT").Value
Sheets(ws_output).Cells(next_row, 48).Value = sumValue
End Sub
The rest of the script is basically:
Sheets(ws_output).Cells(next_row, 1).Resize(NoOfRows).Value = Range("DESCRIPTION").Value
Dim sumValue As Double
or
Sheets(ws_output).Cells(next_row, 24).Value = Range("SITE").Value