Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Eliminating Values from a worksheet

Hello I am hoping someone online here can help me with my delima.

I have a huge worksheet of values in US dollars, and these values are both
positive and negitive. I would like to know if their is a way to eliminate
the lines which cancel each other out. Bascially I am trying to sum the
values but eliminate the values which cancel each other out.

For example line 10 is $100
line 200 is -$100

Is there some type of function i can use to eliminate all values which sum
to 0 ?

Thanks in advance for any help or advice offered

Cheers,

Terry

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Eliminating Values from a worksheet

In fact I do not even need to eliminate the values, rather just identify
which ones will sum to zero with their equal but opposite counterpart.

"Terry" wrote:

Hello I am hoping someone online here can help me with my delima.

I have a huge worksheet of values in US dollars, and these values are both
positive and negitive. I would like to know if their is a way to eliminate
the lines which cancel each other out. Bascially I am trying to sum the
values but eliminate the values which cancel each other out.

For example line 10 is $100
line 200 is -$100

Is there some type of function i can use to eliminate all values which sum
to 0 ?

Thanks in advance for any help or advice offered

Cheers,

Terry

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Eliminating Values from a worksheet

try this
Sub findoppanddelete()
With Worksheets("sheet13").Columns("a")
mc = "a" '
For i = Cells(rows.Count, mc).End(xlUp).Row To 1 Step -1
Set c = .Find(-Cells(i, mc), LookIn:=xlValues, LookAt:=xlWhole)

If Not c Is Nothing Then
rows(i).Delete
rows(c.Row).Delete
End If

Next i
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Terry" wrote in message
...
Hello I am hoping someone online here can help me with my delima.

I have a huge worksheet of values in US dollars, and these values are both
positive and negitive. I would like to know if their is a way to eliminate
the lines which cancel each other out. Bascially I am trying to sum the
values but eliminate the values which cancel each other out.

For example line 10 is $100
line 200 is -$100

Is there some type of function i can use to eliminate all values which sum
to 0 ?

Thanks in advance for any help or advice offered

Cheers,

Terry


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Eliminating Values from a worksheet

Sub findoppandidentify()
With Worksheets("sheet13").Columns("a")
mc = "a" '
For i = Cells(rows.Count, mc).End(xlUp).Row To 1 Step -1
Set c = .Find(-Cells(i, mc), LookIn:=xlValues, LookAt:=xlWhole)

If Not c Is Nothing Then
Cells(c.Row, mc).Offset(, 1).Value = " Matches " & Cells(i, mc)

End If
Next i
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Terry" wrote in message
...
In fact I do not even need to eliminate the values, rather just identify
which ones will sum to zero with their equal but opposite counterpart.

"Terry" wrote:

Hello I am hoping someone online here can help me with my delima.

I have a huge worksheet of values in US dollars, and these values are
both
positive and negitive. I would like to know if their is a way to
eliminate
the lines which cancel each other out. Bascially I am trying to sum the
values but eliminate the values which cancel each other out.

For example line 10 is $100
line 200 is -$100

Is there some type of function i can use to eliminate all values which
sum
to 0 ?

Thanks in advance for any help or advice offered

Cheers,

Terry


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 72
Default Eliminating Values from a worksheet

Hi Terry,

Assuming that values being evaluated are in column A, enter the following in
an empty column:

=IF(COUNTIF(A:A,-A1)=0,"",IF(COUNTIF(A:A,-A1)=COUNTIF(A:A,A1),"Sums to
Zero",""))

Hope this helps.
Peggy

"Terry" wrote:

In fact I do not even need to eliminate the values, rather just identify
which ones will sum to zero with their equal but opposite counterpart.

"Terry" wrote:

Hello I am hoping someone online here can help me with my delima.

I have a huge worksheet of values in US dollars, and these values are both
positive and negitive. I would like to know if their is a way to eliminate
the lines which cancel each other out. Bascially I am trying to sum the
values but eliminate the values which cancel each other out.

For example line 10 is $100
line 200 is -$100

Is there some type of function i can use to eliminate all values which sum
to 0 ?

Thanks in advance for any help or advice offered

Cheers,

Terry

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
Eliminating the high 4 values Dick Gwin Excel Worksheet Functions 2 April 10th 08 12:38 AM
Excel 2003-eliminating blank rows in target worksheet Rich D Excel Discussion (Misc queries) 0 January 3rd 08 06:33 PM
Eliminating 0 values when using the Small formula MIchel Khennafi Excel Worksheet Functions 1 January 31st 07 07:00 PM
Eliminating rows in Excel worksheet 340mango Excel Worksheet Functions 1 May 24th 06 07:49 PM
Identifying/Eliminating Worksheet References timsantiago Excel Discussion (Misc queries) 3 November 9th 05 04:32 PM


All times are GMT +1. The time now is 09:27 PM.

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"