Create list of different columns

  • Thread starter Thread starter dakke
  • Start date Start date
D

dakke

I have been looking for an entire day to find a solution to this. Found
'some' answers but not the thing I need.

I got a few workbooks with a lot of worksheets. For almost every workbook
there needs to be a list of unique values coming from different worksheet
(always in the same workbook). I would like to get a clue on how to do that.

So suppose worksheet 1, and worksheet 2 I would like to create a list on
worksheet 3 gathering all unique values from columns B (of both worksheet 1
and 2) using VBA.

I'm really really not familiar with VBA so suggestions more than welcome.
 
Hi,
Something like this might work.
Dim SRC()
Do Until ActiveCell.Value = ""
For z = n To (n + 1)
ReDim Preserve SRC(n)
SRC(n) = ActiveCell.Value & ActiveCell.Offset(0, 1).Value
For a = 1 To z
If a = z Then GoTo SkipIt
If SRC(a) = SRC(z) Or Right(SRC(z), 1) <> "a" Then
SRC(z) = ""
Else
End If
SkipIt:
Next
ActiveCell.Offset(1, 0).Select
n = n + 1
Next
Loop

The above is looking at two values and it does not go to another sheet, but
I think you can adapt it to what you need. It creates an array and puts
blanks ("") when the value is not unique. Then you go through the array and
see what is not blank.

David
 
It sure points me in the right direction, but need a lot more time to get
this thing actually running. I'll see how far I get with it, I'll let you
know tomorrow :)
 
Well,

it is more likely that I give up on this. I have no clue on where to start,
nor the time to do some reading up on yet another programming language (I'm
not really an IT guy).

I hoped for an easy way out but...

For those familiar with VBA, here my problem again:
I have let's say 8 worksheets, one worksheet named summary, another ReadMe.

All other worksheet contain actual data which starts at line 16 and only
need columns C, G and AO. Variable ranges (sometimes 50 records, sometimes
even 1500) and I do not know how much for each of these worksheets (as in 'I
don't want to count them).
Loop through all worksheets I define, get all cells that are not blank
starting from the row I define and list them all in the worksheet summary.

thanks,
a frustrated vba newbie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top