excel - I need to sum up the number of times a range of strings appear -


so have data imported multiple databases. 1 column range of strings imported , these strings change. in column on spreadsheet imported to, need sum of how many times each string has appeared in imported list.

i have macro producing unique string column sums can go next that.

i thinking whether can compare imported list unique list , +1 in specific cells each time each unique name appears , cycle through unique list names?

eg:

imported list                unique list                        sum abc                          abc                                2  cbc                          cbc                                1 aop                          aop                                1 aoz                          aoz                                1 abc                          xyz                                1 xyz 

is possible , if how?

with data in column a, consider:

sub demo()     dim range, b range, c range     dim n long, long     set = range("a:a")     set b = range("b:b")      a.copy b     b.removeduplicates columns:=1, header:=xlno     n = cells(rows.count, "b").end(xlup).row     = 1 n         cells(i, "c").value = application.worksheetfunction.countif(a, cells(i, "b").value)     next end sub 

enter image description here


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -