Jim DeMarco
Jdemarco at hshhp.org
Tue May 27 12:40:20 CDT 2003
Oleg, I just had a thought on your syntax. Might you have to wrap the range reference in the Range object? Ex: d = Sum(Range("C280:C291")) HTH, Jim DeMarco -----Original Message----- From: Oleg_123 at xuppa.com [mailto:Oleg_123 at xuppa.com] Sent: Tuesday, May 27, 2003 1:34 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] (OT) Excel - adding cell values Charles, it works fine when it has to get a single value of a cell, but fails to do additions using formula. it is supposed to get values from one book and paste them to another. Values A, B, C, work fine; d and e do not. I would write out everything (like I did for C) exsept last vale supposed to contain a sum of 60 records, and it would make the code unreadable Workbooks.Open Filename:="L:\PCO\Artemis\CitigroupN.xls" A = Range("C269").Value B = Range("C270").Value c = Range("C270").Value + Range("C271").Value + Range("C272").Value d = Sum("C280:C291") e = Range("C292:C352") Windows("MAR_ArtemisCheck.xls").Activate Range("B4").Value = A Range("C4").Value = B Range("d4").Value = c Range("F4").Value = d Range("G4").Value = e > Oleg, > > Then you are missing a needed reference to the Excel libraries. > > Charles Wortz > Software Development Division > Texas Education Agency > 1701 N. Congress Ave > Austin, TX 78701-1494 > 512-463-9493 > CWortz at tea.state.tx.us > > > > -----Original Message----- > From: Oleg_123 at xuppa.com [mailto:Oleg_123 at xuppa.com] > Sent: Tuesday 2003 May 27 11:31 > To: accessd at databaseadvisors.com > Subject: RE: [AccessD] (OT) Excel - adding cell values > > It was a first thing i tried. Gives me an error message "sub or function > not defined" > > >> You can try C = SUM("C13:C18") >> >> Doris Manning >> Database Administrator >> Hargrove Inc. >> www.hargroveinc.com >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of >> Oleg_123 at xuppa.com >> Sent: Tuesday, May 27, 2003 10:12 AM >> To: accessd at databaseadvisors.com >> Subject: [AccessD] (OT) Excel - adding cell values >> >> >> He group, >> does anyone know if I can use SUM in the case below ? I can't seem to >> find it. Thanks >> >> C = Range("C13").Value + Range("C14").Value + Range("C15").Value + >> Range("C16").Value + Range("C17").Value + Range("C18").Value > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com ----------------------------------------- You are entitled to Get 100% FREE perfume (S&H is FREE)! Click Here: http://azjmp.com/az/ch.php?f=176&i=657&sub=webmail _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". ***********************************************************************************