Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

advise pls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hopeless With excel - 22 Jan 2006 15:49 GMT
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
Gary''s Student - 22 Jan 2006 16:49 GMT
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

Signature

Gary''s Student

> hi all excel gurus....
>
[quoted text clipped - 21 lines]
> can some one help?
> thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.