Formula Help Last One Please!!

Morrissey

Board Regular
Joined
Mar 8, 2002
Messages
85
Ok I Want The Following Cells To Add Up

G18,G18,G19,G20,G21,G22,G23,G24,G25,G26,G27,G28 Then I Want Them To Be Multiplied By 0.2 And I Want That Result Added To Them

Eg

20
20
20
20
20+
---
100x0.2=20

100+20=120

that is the sort of result I want
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
You're taking the **** with this one aren't you?

Do you really want G18 summed twice or was that a typo?
 
Upvote 0
Hi,

I assume that you meant G17 as the first item, rather than G18.

The following routine assigns the value you want to the variable "sum_em_up."

----------
Sub add_em()
Dim sum_em_up As Double
Dim SumRng As Range

Set SumRng = Range("G17:G28")
sum_em_up = WorksheetFunction.Sum(SumRng) * 1.2
MsgBox sum_em_up

End Sub
----------------

Bye,
Jay
 
Upvote 0

Forum statistics

Threads
1,213,524
Messages
6,114,117
Members
448,549
Latest member
brianhfield

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