Doing addition for a range of values between columns

BenjaminLWX

New Member
Joined
Jun 17, 2014
Messages
28
0.002456706
0.002802535
0.003163419
0.003538764
0.00392804
0.004330764
0.004746497
0.005174833
0.0056154
0.006067848

<tbody>
</tbody>

-7.77544E-05
-0.000155509
-0.000233263
-0.000311018
-0.000388772
-0.000466527
-0.000544281
-0.000622035
-0.00069979
-0.000777544

<tbody>
</tbody>


<tbody>
</tbody>


Hi all,

I have an issue with the subtracting of the values from column 1 and 2 of each row of values respectively.
For example: Taking Row 1 values, (0.002456706+(-7.77544E-05)) = Answer
Is there anyone who could guide me on how to code for this type of calculation? Thank you.

Best Regards,
Benjamin Lim
 
Or if it is the columns you want to change then:
Code:
Dim cnt As Long 'put this line with other Dim statements at top
cnt = 0 'Initialize the variable
For A = DF To DT
    Sheet3.Cells(2 + A, 14).Value = Sheet4.Cells(2, 14).Value * (A - DF)
    'add the variable to either the row or column value as applicable
    Sheet5.Cells(h + 6, 2 + cnt).Value = Sheet3.Cells(h + 2, 12) + Sheet3.Cells(2 + A, 14)
    cnt = cnt + 1 'Advance variable value
Next A
cnt = 0
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
0.002126599
0.002456706
0.002802535
0.003163419
0.003538764
0.00392804
0.004330764
0.004746497
0.005174833
0.0056154
0.006067848
<tbody> </tbody>
0
-7.77544E-05
-0.000155509
-0.000233263
-0.000311018
-0.000388772
-0.000466527
-0.000544281
-0.000622035
-0.00069979
-0.000777544
<tbody> </tbody>
0.002126599
0.002378952
0.002647027
0.002930156
0.003227747
0.003539268
0.003864238
0.004202216
0.004552798
0.00491561
0.005290303
<tbody> </tbody>
0.002126599
0.002456706
0.002802535
0.003163419
0.003538764
0.00392804
0.004330764
0.004746497
0.005174833
0.0056154
0.005290303
<tbody> </tbody>
<tbody> </tbody>

Thank you for your codes. I’ve tried it out but still can’t get the addition that I desired. I had also tried using “Sheet5.Cells (h + 6 + A, 2).Value” but there was no values being shown. As you can see from the new tale, the first two highlighted red columns were the values that I posted on my first post. The green highlighted column is the correct values but if you look at the red column to the right, they are the values that are currently being produced in sheet5 which means that there was no addition done.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,830
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top