Edgarvelez
Board Regular
- Joined
- Jun 6, 2019
- Messages
- 197
- Office Version
- 2016
- Platform
- Windows
Hi All,
Was given a code and has worked really good, however I had to make a change (Added a row in sht1) and my range is not longer ("D9:D13") and now it's now ("D9") and ("D11:D13")
Need some help fixing this line, tried a few thing but I get errors and its above my knowledge grade, any help is appreciated and thanks.
Was given a code and has worked really good, however I had to make a change (Added a row in sht1) and my range is not longer ("D9:D13") and now it's now ("D9") and ("D11:D13")
Need some help fixing this line, tried a few thing but I get errors and its above my knowledge grade, any help is appreciated and thanks.
VBA Code:
sh1.Select
Select Case Join(Application.Transpose(sh1.Range("D9:D13").Value), "|")
Case "Metric Ton|GW|Single Line|Single Line Weight"
sh1.Range("D32").Select
ActiveCell.FormulaR1C1 = "=ROUND((R[-6]C/R[-8]C),3)"
sh1.Range("D33").Select
ActiveCell.FormulaR1C1 = "=ROUND((R[-6]C/R[-9]C),3)"
sh1.Range("A1").Select
'GW
sh1.Range("D26").Copy
sh2.Cells(Rows.Count, 8).End(xlUp)(2).Resize(sh1.Range("D30").Value).PasteSpecial xlPasteValues
Application.CutCopyMode = False
sh1.Range("D30:D33").Select
Selection.ClearContents
sh1.Range("A1")