|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > simplifying prob..... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|