473,795 Members | 3,151 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vba, how to use vba to search how many distinct amount in same column?

123 New Member
vba, how to use vba to search how many distinct amount in same column?

for example..
column C have amount

123
123
444
123
445
444

then after using vba, it will show you it is 4 unique element..

Thanks
Nov 21 '07 #1
2 1298
jamesd0142
469 Contributor
vba, how to use vba to search how many distinct amount in same column?

for example..
column C have amount

123
123
444
123
445
444

then after using vba, it will show you it is 4 unique element..

Thanks
if your querying from a database then the sql staement will be somthing like...
Expand|Select|Wrap|Line Numbers
  1. select distinct count(<columnname>) from <tablename>
  2.  
if your not using a database, could you explain where these values are stored...

=============== =============== =============== ========
By the way theres 3 unique rows in you example :P
=============== =============== =============== ========
Thanks James
Nov 21 '07 #2
perhapscwk
123 New Member
it is from a excel file and i want to use vba to calculate it
Nov 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1631
by: Abby Lee | last post by:
My code does what I want (works unless there is a lot of volume...works for this month cause not a lot of items marked paid yet...) but the page times out for last month because there is just so many items. Is there a better way to do this? my page gets all distinct Oganizations. within each organization it gets each distinct Fund within each fund it gets each distinct Program then it lists each item that is paid for the month being...
0
3667
by: todd | last post by:
here is a search tool SP I wrote. How many times have you wanted to search all your Stored procs or views (in a database) for a keyword but couldn't!? Well now you can! THis can makes life a lot easier for developers. Would you email me and let me know which part of the world my code is running in?
2
2239
by: misschristalee | last post by:
I'm having a brain blockage day.... Scenario: Search Form with 6 text boxes Query has same six fields Each has this IIF: IIf(IsNull(!!),"",!!) with each dictating the correct text box of course. SQL dictates... If text box 1 isNull do nothing or do this OR if text
3
1809
by: Jan Szymczuk | last post by:
I am trying to create a query that will show me who is phoning who in an organisation from available Telephone Billing information. I am creating a MSAccess 2000 database with a few few tables, two of which are: TableMembers: (containg fields Refs, DateCreated, MembershipNo, OfficeLocation ...NB: Refs has a Primary Key - No Duplicates) TablePeople: (containing fields: Refs, Name, Addr, TelHome, TelWork, TelMobile & TelFax)...
17
16385
by: keith | last post by:
I am trying to get a exact count of different distinct entries in an Access column. At first, I was trying to work with three columns, but I've narrowed it down to one to simplify it. I've searched Google Groups for Distinct Count and Count, the Microsoft Help file (which apparently has bad links in Office 2003), and looked at other files, but I can't find the answer. The closest I've been able to get is to create a query to find the...
4
2632
by: rh | last post by:
Hi, I'd like to add an incremental search to my windows form DataGrid that works like the one used in Windows Explorer. In Windows Explorer, when you type a character it jumps to the first item that matches that character. If you type another letter within a given amount of time it will be part of the same search so that it will match the first 2 characters and so on. If you wait long enough and then type another character, it will treat...
2
2629
by: Arsalan Ahmad | last post by:
Hi, May be I am a newbie, or may be i dont have that much insight in following systems ..i.e. why i have some confusions as below: In many websites, when search is performed on some keywords (not only including google which perform general search but other sites which perform seach on a particular type of item in their database) then many search results are obtained (for example more than 100 or even more than 1000) but only limited...
2
3016
by: pengbsam | last post by:
Hello: I need to write a program that search through multiple level BOM, get all the items. It seems like a easy enough project, but when I put my hands on it and couple of hundred lines of codes later. It starts look more difficult. I was hopeing someone might have a very easy way to do it that I don't know about... The BOM structure looks like this.. Father Child A 1 A 2
4
1724
by: | last post by:
Hello... i have a table which contains a column named "ask" and a column named "per"... my think is that i want to search in "ask" and echo the data stored in "per" for this entry... How do i do this? Thanx in advance! JBK
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7540
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.