Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 20th, 2005, 03:34 AM
sk01 sk01 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: SOuth east england
Posts: 52 sk01 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 44 m 53 sec
Reputation Power: 5
Exclamation simplifying prob.....

can someone please help with the process required to achieve the following.. it will initially be implemented via a macro in excel...

say if i have 2 account contracts, with slightly different naming conventions, but with the same serial numbers, and different results,
e.g.

row1: contract(col1) serial number(col2) assetvalue(col3)
row2: silver1a-a xs1234 20,000
row3: silver1a-b xs1234 10,000

as you can see the contract names are slightly diffreent, but i need a code that can recongnise identical double serial number entries and make this into one contract, i.e. as 'silver1a' and have this computed, preferably automated, as:

ideal output....

contract serial number asset value
silver1a xs1234 30,000 ( sum of 20,000 and 10,000)

can anyone help in creating a search condition that could achieve this??


any help is appreciated...

kindest regards
__________________
May buddha bless u

Reply With Quote
  #2  
Old February 22nd, 2005, 10:33 AM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
This problem is much better suited to be solved in MS Access versus Excel. and simple SQL statement will get you what you wanted. However changing the contract number will be the hard part, not the actual doing, but the deciding what to make the new contract number to be like.

1 solution using SQL to fix your issue in Access

Code:
Select First(contract) as Contract, [serial number], Sum(assetvalue) as AssetValue
From Table
group By [serial number]


S-
__________________
If you have found a particular post helpful, show your appreciation by adding reputation points to that user by clicking the "scales" image in the upper right had corner of their post.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > simplifying prob.....


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway