Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default summing data using VBA


Hello there;

I am working on a project for some call stats and QA figures, and am
lost at trying to use VBA to calculate the functions that I need.

I am working with with three columns with many rows of data. The one
column (column D) has the previous weeks totals; column E has the
current weeks totals. in Column G, I am trying to find the difference
between the two previous columns to show the improvements made, if any.
The problem is that column E can contain the "0" (zero) or "Inactive"
labels and this is causing a problem with the usual SUM feature. What I
am wondering is if a VBA function or Macro is going to be needed to come
up with the following thinking:

If row X; column E has "inactive" or "0", then print column D inside
column G
Else
if row X; column E contains a number, then subtract column D from
column E and print to Column G

The problem is that I don't know how to reference the particular
columns within VBA for Excel, nor waht functions are needed. Can anyone
help clear this up for me, or help me to create a starting point to
create this feasability?

Thank you
Mikey
dakoris73


--
dakoris73
------------------------------------------------------------------------
dakoris73's Profile: http://www.excelforum.com/member.php...o&userid=34901
View this thread: http://www.excelforum.com/showthread...hreadid=546414

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default summing data using VBA

Why use VBA

in G

=IF(OR(E2=0,E2="Inactive"),D2,E2-D2)

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"dakoris73" wrote
in message ...

Hello there;

I am working on a project for some call stats and QA figures, and am
lost at trying to use VBA to calculate the functions that I need.

I am working with with three columns with many rows of data. The one
column (column D) has the previous weeks totals; column E has the
current weeks totals. in Column G, I am trying to find the difference
between the two previous columns to show the improvements made, if any.
The problem is that column E can contain the "0" (zero) or "Inactive"
labels and this is causing a problem with the usual SUM feature. What I
am wondering is if a VBA function or Macro is going to be needed to come
up with the following thinking:

If row X; column E has "inactive" or "0", then print column D inside
column G
Else
if row X; column E contains a number, then subtract column D from
column E and print to Column G

The problem is that I don't know how to reference the particular
columns within VBA for Excel, nor waht functions are needed. Can anyone
help clear this up for me, or help me to create a starting point to
create this feasability?

Thank you
Mikey
dakoris73


--
dakoris73
------------------------------------------------------------------------
dakoris73's Profile:

http://www.excelforum.com/member.php...o&userid=34901
View this thread: http://www.excelforum.com/showthread...hreadid=546414



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default summing data using VBA


Hello Bob;

Thank you for that little bit of code. That actually worked better tha
I thought it would. I guess I was looking at the problem as a muc
bigger issue that it is....

Thanks again

mikey
dakoris7

--
dakoris7
-----------------------------------------------------------------------
dakoris73's Profile: http://www.excelforum.com/member.php...fo&userid=3490
View this thread: http://www.excelforum.com/showthread.php?threadid=54641

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Summing Data rfhorn Excel Worksheet Functions 3 January 27th 10 08:30 PM
Summing like data nba Excel Discussion (Misc queries) 5 September 29th 09 10:55 AM
Summing up Data Tom K[_2_] Excel Worksheet Functions 10 January 16th 09 02:57 AM
summing data david72 Excel Discussion (Misc queries) 1 May 17th 06 04:15 AM
Summing data yesac142 Excel Discussion (Misc queries) 6 June 20th 05 01:47 PM


All times are GMT +1. The time now is 09:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"