![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 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 |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
You're taking the piss with this one aren't you?
Do you really want G18 summed twice or was that a typo? |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
typo my bad sorry
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Southfield,MI USA
Posts: 1,030
|
Morrissey,
Are you looking for just the following? =1.2*sum(G18:G28) Adam |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
Thank Yopu Very Much I Love You
Moz |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Hey, send some love my way man.
|
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
I love you too
|
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
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 |
|
|
|
|
|
#9 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
Thanks Jay its done now!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|