Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Macro sum problem in excel 2007

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 07-04-2009
Member
 
Join Date: Dec 2008
Posts: 63
Macro sum problem in excel 2007
  

I am having problem with macros in Excel 2007. I created the following macro: If Range ( "M10") = 2 Then Range ( "K20"). Copy Range ( "D3") This little function allows me to paste the contents of the cell K20 in a table cell D3.
So far, no problem. The concern is that I wanted the cell K20 corresponds to the sum of cells M17 + M18 + M19. And there, it's corse. Excel installation error # REF! from the time when the formula contains a sum.
For the moment, so I have to manually enter the number 9 (sum of M17-18-19) for example, so that the button on the copy which I support in cell D3.

Can anyone know tips to do this ?

Thanks

Reply With Quote
  #2  
Old 07-04-2009
Member
 
Join Date: Dec 2008
Posts: 27
Re: Macro sum problem in excel 2007

For the Sum function is a beach to be given.
= SUM (A1: A20)
and nothing else.
Reply With Quote
  #3  
Old 07-04-2009
Member
 
Join Date: May 2008
Posts: 90
Re: Macro sum problem in excel 2007

K20 in the box I put the following formula
IF (ESTERREUR (M17 + M18 + M19 );""; M17 + M18 + M19)
This formula is the sum of your 3 cells, and if ever there is an error (eg there is a character instead of a number in the formula), and it is the emptiness in your case. Explanation: ESTERREUR () checks what is inside the parenthesis, if it # returns a ref, then it will be there after 1st semicolon, in this case it is the "" nothing, but you can replace by 0. Otherwise, if there is no error and therefore the amount is correct and it is there after the 2nd semi-colon, or in our case ta sum (M17 + M18 + M19).
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Macro sum problem in excel 2007"
Thread Thread Starter Forum Replies Last Post
Excel 2003 Macro doesn't work in Excel 2007 jjaw Windows Software 3 03-01-2014 03:28 PM
Excel 2007 macro help needed AZUL Software Development 4 19-11-2009 06:10 PM
Macro for deleting every alternate row in Excel 2007 Akiraa Windows Software 3 22-10-2009 10:19 PM
Cannot find macro working in excel 2007 Visala Windows Software 3 06-08-2009 11:47 PM
Set the Macro Security Level in Excel 2007 NIcaBoy Windows Software 3 21-04-2009 02:04 PM


All times are GMT +5.5. The time now is 07:46 AM.