Hi Experts,
Currently I faced a problem with my codes, but let me explain what I am trying to achieve here.
So I have a worksheet that have many columns and headers, I would like to update the entire column(s) where the header name contains "iot".
So the entire column already has values in each cell, and that value should be updated with a formula i.e. value * 20% + 10.
In the example below, the results would then be updated as shown below.
I have my 2 liner codes below, but somehow I can't figure that out. I would appreciate if any experts could guide me in the right direction please. Thank you!
Before
iot1 | bs1 | iot2 | bs2
3 | 2 | 5 | 2
After
iot1 | bs1 | iot2 | bs2
13.6| 2 | 16 | 2
For i = ActiveSheet.Columns.Count To 1 Step -1
If InStr(1, Cells(2, i), "iot") Then Columns(i).EntireColumn.Value = Columns(i).EntireColumn.Value * 0.15 + 10
Currently I faced a problem with my codes, but let me explain what I am trying to achieve here.
So I have a worksheet that have many columns and headers, I would like to update the entire column(s) where the header name contains "iot".
So the entire column already has values in each cell, and that value should be updated with a formula i.e. value * 20% + 10.
In the example below, the results would then be updated as shown below.
I have my 2 liner codes below, but somehow I can't figure that out. I would appreciate if any experts could guide me in the right direction please. Thank you!
Before
iot1 | bs1 | iot2 | bs2
3 | 2 | 5 | 2
After
iot1 | bs1 | iot2 | bs2
13.6| 2 | 16 | 2
For i = ActiveSheet.Columns.Count To 1 Step -1
If InStr(1, Cells(2, i), "iot") Then Columns(i).EntireColumn.Value = Columns(i).EntireColumn.Value * 0.15 + 10