Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "dakke" wrote: 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 :) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create List of Unique Values from several columns | Excel Discussion (Misc queries) | |||
Create a list from many columns | Excel Discussion (Misc queries) | |||
How do I create a list of unique values from 2 columns of data | Excel Worksheet Functions | |||
Compare 2 columns, and create a list of items that are in both lists | Excel Worksheet Functions | |||
How do I create multiple columns from a one-column list in Excel? | Excel Worksheet Functions |