Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello all, could someone help me to write a Macro : I Have Numbers in Cells B12 to B?? (Variable) & Cells C12 to C??(Variable) In Cells D12 to D?? (to the last one), I want to do the sum of the respective B+C Cells. For Example, D12 = B12 + C12 ..... ..... D20 = B20 + C20 ..... Thanks in Advance -- herve ------------------------------------------------------------------------ herve's Profile: http://www.excelforum.com/member.php...o&userid=27314 View this thread: http://www.excelforum.com/showthread...hreadid=481834 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sounds like you'd be best off with in cell operations. Did you try adding
them right in the D column? Like D12: '=B12+C12', then copying that formula down the rows. Or did you want that it should be automated/callable and result in raw values? (Hence the 'Macro'...) "herve" wrote in message ... Hello all, could someone help me to write a Macro : I Have Numbers in Cells B12 to B?? (Variable) & Cells C12 to C??(Variable) In Cells D12 to D?? (to the last one), I want to do the sum of the respective B+C Cells. For Example, D12 = B12 + C12 .... .... D20 = B20 + C20 .... Thanks in Advance -- herve ------------------------------------------------------------------------ herve's Profile: http://www.excelforum.com/member.php...o&userid=27314 View this thread: http://www.excelforum.com/showthread...hreadid=481834 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() For i = 12 To Cells(Rows.Count).End(xlUp).Row Cells(i,"D").Formula = "=B" & i & "+C" & i Next i -- HTH RP (remove nothere from the email address if mailing direct) "Mike Mertes" wrote in message ... Sounds like you'd be best off with in cell operations. Did you try adding them right in the D column? Like D12: '=B12+C12', then copying that formula down the rows. Or did you want that it should be automated/callable and result in raw values? (Hence the 'Macro'...) "herve" wrote in message ... Hello all, could someone help me to write a Macro : I Have Numbers in Cells B12 to B?? (Variable) & Cells C12 to C??(Variable) In Cells D12 to D?? (to the last one), I want to do the sum of the respective B+C Cells. For Example, D12 = B12 + C12 .... .... D20 = B20 + C20 .... Thanks in Advance -- herve ------------------------------------------------------------------------ herve's Profile: http://www.excelforum.com/member.php...o&userid=27314 View this thread: http://www.excelforum.com/showthread...hreadid=481834 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi bob, that macro seems not working. Regards Herve -- herve ------------------------------------------------------------------------ herve's Profile: http://www.excelforum.com/member.php...o&userid=27314 View this thread: http://www.excelforum.com/showthread...hreadid=481834 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Mike, but would prefer to do it by macro, First, select the last B and C cell and after, do the sum. Regards -- herve ------------------------------------------------------------------------ herve's Profile: http://www.excelforum.com/member.php...o&userid=27314 View this thread: http://www.excelforum.com/showthread...hreadid=481834 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One more based on Bob's response:
range("d12:d" & cells(rows.count,"B").end(xlup).row).Formula = "=B12+c12" herve wrote: Thanks Mike, but would prefer to do it by macro, First, select the last B and C cell and after, do the sum. Regards -- herve ------------------------------------------------------------------------ herve's Profile: http://www.excelforum.com/member.php...o&userid=27314 View this thread: http://www.excelforum.com/showthread...hreadid=481834 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro copy/paste data from multiple cells to multiple cells | Excel Discussion (Misc queries) | |||
macro to colour empty cells (cells not recognized as empty) | Excel Programming | |||
Macro - Playing Macro if cells are locked | Excel Programming | |||
a script/macro to copy a block of cells next to specified cells | Excel Programming | |||
Merge cells using macro | Excel Programming |