Edgarvelez
Board Regular
- Joined
- Jun 6, 2019
- Messages
- 197
- Office Version
- 2016
- Platform
- Windows
Hi all, never done this before with formulas and need some help.
I have 2 sheets Sh1. & Sh2.
In Sh2. I have a dynamic range in H and I need to apply a formula to the values
The formula is the value in each cell multiplied by 2204.6244202 (*2204.6244202)
I am using case and if in Sh1. D10 from the dropdown is YES then I want to add the formula if the current value of the cell x 2204.6244202
I started some of the code already but have never done this adding a formula to a range.
I have 2 sheets Sh1. & Sh2.
In Sh2. I have a dynamic range in H and I need to apply a formula to the values
The formula is the value in each cell multiplied by 2204.6244202 (*2204.6244202)
I am using case and if in Sh1. D10 from the dropdown is YES then I want to add the formula if the current value of the cell x 2204.6244202
I started some of the code already but have never done this adding a formula to a range.
VBA Code:
Case "Metric Ton|GW|Single Line|Single Line Weight"
Select Case sh1.Range("D10").Value
Case "No"
sh2.Cells(Rows.Count, 8).End(xlUp)(2).Resize(sh1.Range("D30").Value).NumberFormat = "0.000"
sh1.Range("D26").Copy
sh2.Cells(Rows.Count, 8).End(xlUp)(2).Resize(sh1.Range("D30").Value).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Case "Yes"
sh1.Range("A1").Select
sh1.Range("D30:D33").Select
Selection.ClearContents
sh1.Range("A1").Select