#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default advise pls

hi all excel gurus....

can some one pls advise me if it possible to identify numbers in pairs
that sum up to become 0?

i have data like

a)-30
b)56
c)30
d)78
e)-90
f)-30
g) -10
h)-9
i) 45
j)10
k)30
L)9
my ans are
as u can see (a) and (C) & (f) and (k) , h&L and g&i

each number can only be used once
can some one help?
thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default advise pls

If A1 thru B12 contain:
a -30
b 56
c 30
d 78
e -90
f -30
g -10
h -9
i 45
j 10
k 30
L 9
then enter and run:
Sub gary()
For i = 1 To 11
For j = i + 1 To 12
If Cells(i, 2).Value + Cells(j, 2).Value = 0 Then
MsgBox (Cells(i, 1).Value & Cells(j, 1).Value)
End If
Next
Next
End Sub

--
Gary''s Student


"Hopeless With excel" wrote:

hi all excel gurus....

can some one pls advise me if it possible to identify numbers in pairs
that sum up to become 0?

i have data like

a)-30
b)56
c)30
d)78
e)-90
f)-30
g) -10
h)-9
i) 45
j)10
k)30
L)9
my ans are
as u can see (a) and (C) & (f) and (k) , h&L and g&i

each number can only be used once
can some one help?
thanks


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
New to VLookUps.... please advise neilcarden Excel Worksheet Functions 4 April 16th 05 06:32 AM
pls advise George Excel Worksheet Functions 2 February 25th 05 08:22 PM
I need some Advise Tom Ogilvy Excel Programming 0 October 16th 04 12:50 AM
Advise VBA No Name Excel Programming 7 December 3rd 03 07:14 PM
VBA Advise RB[_3_] Excel Programming 1 July 15th 03 03:26 AM


All times are GMT +1. The time now is 05:49 PM.

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

About Us

"It's about Microsoft Excel"