Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Lookup function, but then a bit complicater

I am having the following set of data. 14000 rows.

A B
1010071 80425
1010071 80253
1010071 80425
1010071 80253
1010083 80451
1010083 80205
1010083 81853
1010083 80451
1010083 80205
1010083 81853
and so on...

What I want to is this:

Make a colum for C: Looking like this:

1010071
1010083
and so on.. = peace of cake and is done.

But now is the problem.

Behind this colum I want some colums holding the data for B.

Looking like this

1010071 80425 80253
1010083 80451 80205 81853 80451
80205 81853
and so on....

I am having absolutely NO IDEA how to fix this one. any help would be
welcome since doing this by hand is too much..I am pretty familiar
with excel ( and a little with VBA)

Thanks for any advice.

Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Lookup function, but then a bit complicater

Public Sub ProcessData()
Const TEST_COLUMN As String = "A"
Dim i As Long
Dim LastRow As Long

With ActiveSheet

LastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = LastRow To 2 Step -1
If .Cells(i, TEST_COLUMN).Value = _
.Cells(i - 1, TEST_COLUMN).Value Then

.Cells(i, "B").Resize(, 250).Copy .Cells(i - 1, "C")
.Rows(i).Delete
End If
Next i

End With

End Sub



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Robert" wrote in message
...
I am having the following set of data. 14000 rows.

A B
1010071 80425
1010071 80253
1010071 80425
1010071 80253
1010083 80451
1010083 80205
1010083 81853
1010083 80451
1010083 80205
1010083 81853
and so on...

What I want to is this:

Make a colum for C: Looking like this:

1010071
1010083
and so on.. = peace of cake and is done.

But now is the problem.

Behind this colum I want some colums holding the data for B.

Looking like this

1010071 80425 80253
1010083 80451 80205 81853 80451
80205 81853
and so on....

I am having absolutely NO IDEA how to fix this one. any help would be
welcome since doing this by hand is too much..I am pretty familiar
with excel ( and a little with VBA)

Thanks for any advice.

Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Lookup function, but then a bit complicater

On Dec 4, 2:58 pm, Robert wrote:
I am having the following set of data. 14000 rows.

A B
1010071 80425
1010071 80253
1010071 80425
1010071 80253
1010083 80451
1010083 80205
1010083 81853
1010083 80451
1010083 80205
1010083 81853
and so on...

What I want to is this:

Make a colum for C: Looking like this:

1010071
1010083
and so on.. = peace of cake and is done.

But now is the problem.

Behind this colum I want some colums holding the data for B.

Looking like this

1010071 80425 80253
1010083 80451 80205 81853 80451
80205 81853
and so on....

I am having absolutely NO IDEA how to fix this one. any help would be
welcome since doing this by hand is too much..I am pretty familiar
with excel ( and a little with VBA)

Thanks for any advice.

Robert


Hi
1.Do text to columns, using the space to seperate them. Soppose the
data is now in columns A and B and starts in row 1
2. Type this formula in C1
=IF($A16=$A15,B16,"")
3. Drag the formula down column C
4. If there are any none blanks in column C, drag the formula to
column D. Repeat until you have a column of blanks
5. Copy all your data and paste special...values to where it is, so
that you remove the formulas.

regards
Paul
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Lookup function, but then a bit complicater

On Dec 4, 3:29 pm, wrote:
On Dec 4, 2:58 pm, Robert wrote:





I am having the following set of data. 14000 rows.


A B
1010071 80425
1010071 80253
1010071 80425
1010071 80253
1010083 80451
1010083 80205
1010083 81853
1010083 80451
1010083 80205
1010083 81853
and so on...


What I want to is this:


Make a colum for C: Looking like this:


1010071
1010083
and so on.. = peace of cake and is done.


But now is the problem.


Behind this colum I want some colums holding the data for B.


Looking like this


1010071 80425 80253
1010083 80451 80205 81853 80451
80205 81853
and so on....


I am having absolutely NO IDEA how to fix this one. any help would be
welcome since doing this by hand is too much..I am pretty familiar
with excel ( and a little with VBA)


Thanks for any advice.


Robert


Hi
1.Do text to columns, using the space to seperate them. Soppose the
data is now in columns A and B and starts in row 1
2. Type this formula in C1
=IF($A16=$A15,B16,"")
3. Drag the formula down column C
4. If there are any none blanks in column C, drag the formula to
column D. Repeat until you have a column of blanks
5. Copy all your data and paste special...values to where it is, so
that you remove the formulas.

regards
Paul- Hide quoted text -

- Show quoted text -


Oops
Forgot to add the filtering bits:

0. Highlight the two columns, and do an advanced filter...choose "copy
to another location" and select unique items. Choose the Copy To cell
on a new sheet in A1
....
and
6. Highlight column A and do another advanced filter...choose "Filter
the list in place" and select unique items
7. Copy the filtered data to a new location and you are done.

regards
Paul
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Lookup function, but then a bit complicater

Thank you for the advice. I managed to create my routings. The filter
didnt do what it is supposed to do. Maybe beaceause of some
inconsistent data.

I second row, I replaced the codes with letters, so I could easily
concatenate them.

1010479 L LKRM
1010479 K KRM
1010479 R RM
1010479 M M
1010490 H HSN HSN HSN
1010490 S SN SN
1010490 N N N



What I now want is only the above in 2 new colums.
1010479 LKRM
1010490 HSN

Is there an easy way to do is also?


On 4 dec, 16:42, wrote:
On Dec 4, 3:29 pm, wrote:



On Dec 4, 2:58 pm, Robert wrote:


I am having the following set of data. 14000 rows.


A B
1010071 80425
1010071 80253
1010071 80425
1010071 80253
1010083 80451
1010083 80205
1010083 81853
1010083 80451
1010083 80205
1010083 81853
and so on...


What I want to is this:


Make a colum for C: Looking like this:


1010071
1010083
and so on.. = peace of cake and is done.


But now is the problem.


Behind this colum I want some colums holding the data for B.


Looking like this


1010071 80425 80253
1010083 80451 80205 81853 80451
80205 81853
and so on....


I am having absolutely NO IDEA how to fix this one. any help would be
welcome since doing this by hand is too much..I am pretty familiar
with excel ( and a little with VBA)


Thanks for any advice.


Robert


Hi
1.Do text to columns, using the space to seperate them. Soppose the
data is now in columns A and B and starts in row 1
2. Type this formula in C1
=IF($A16=$A15,B16,"")
3. Drag the formula down column C
4. If there are any none blanks in column C, drag the formula to
column D. Repeat until you have a column of blanks
5. Copy all your data and paste special...values to where it is, so
that you remove the formulas.


regards
Paul- Hide quoted text -


- Show quoted text -


Oops
Forgot to add the filtering bits:

0. Highlight the two columns, and do an advanced filter...choose "copy
to another location" and select unique items. Choose the Copy To cell
on a new sheet in A1
...
and
6. Highlight column A and do another advanced filter...choose "Filter
the list in place" and select unique items
7. Copy the filtered data to a new location and you are done.

regards
Paul




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Lookup function, but then a bit complicater

Hi
Put column headings on your data.
Select the first column only
Do Filter, Advanced Filter, Filter in place and tick "Unique Items
Only".
Copy what you get to a new location and delete the columns you don't
want.

regards
Paul


On Dec 5, 8:08 am, Robert wrote:
Thank you for the advice. I managed to create my routings. The filter
didnt do what it is supposed to do. Maybe beaceause of some
inconsistent data.

I second row, I replaced the codes with letters, so I could easily
concatenate them.

1010479 L LKRM
1010479 K KRM
1010479 R RM
1010479 M M
1010490 H HSN HSN HSN
1010490 S SN SN
1010490 N N N

What I now want is only the above in 2 new colums.
1010479 LKRM
1010490 HSN

Is there an easy way to do is also?

On 4 dec, 16:42, wrote:



On Dec 4, 3:29 pm, wrote:


On Dec 4, 2:58 pm, Robert wrote:


I am having the following set of data. 14000 rows.


A B
1010071 80425
1010071 80253
1010071 80425
1010071 80253
1010083 80451
1010083 80205
1010083 81853
1010083 80451
1010083 80205
1010083 81853
and so on...


What I want to is this:


Make a colum for C: Looking like this:


1010071
1010083
and so on.. = peace of cake and is done.


But now is the problem.


Behind this colum I want some colums holding the data for B.


Looking like this


1010071 80425 80253
1010083 80451 80205 81853 80451
80205 81853
and so on....


I am having absolutely NO IDEA how to fix this one. any help would be
welcome since doing this by hand is too much..I am pretty familiar
with excel ( and a little with VBA)


Thanks for any advice.


Robert


Hi
1.Do text to columns, using the space to seperate them. Soppose the
data is now in columns A and B and starts in row 1
2. Type this formula in C1
=IF($A16=$A15,B16,"")
3. Drag the formula down column C
4. If there are any none blanks in column C, drag the formula to
column D. Repeat until you have a column of blanks
5. Copy all your data and paste special...values to where it is, so
that you remove the formulas.


regards
Paul- Hide quoted text -


- Show quoted text -


Oops
Forgot to add the filtering bits:


0. Highlight the two columns, and do an advanced filter...choose "copy
to another location" and select unique items. Choose the Copy To cell
on a new sheet in A1
...
and
6. Highlight column A and do another advanced filter...choose "Filter
the list in place" and select unique items
7. Copy the filtered data to a new location and you are done.


regards
Paul- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Lookup function, but then a bit complicater

Eureka! It worked fine. Thank you sooo much :)

On 5 dec, 10:06, wrote:
Hi
Put column headings on your data.
Select the first column only
Do Filter, Advanced Filter, Filter in place and tick "Unique Items
Only".
Copy what you get to a new location and delete the columns you don't
want.

regards
Paul

On Dec 5, 8:08 am, Robert wrote:

Thank you for the advice. I managed to create my routings. The filter
didnt do what it is supposed to do. Maybe beaceause of some
inconsistent data.


I second row, I replaced the codes with letters, so I could easily
concatenate them.


1010479 L LKRM
1010479 K KRM
1010479 R RM
1010479 M M
1010490 H HSN HSN HSN
1010490 S SN SN
1010490 N N N


What I now want is only the above in 2 new colums.
1010479 LKRM
1010490 HSN


Is there an easy way to do is also?


On 4 dec, 16:42, wrote:


On Dec 4, 3:29 pm, wrote:


On Dec 4, 2:58 pm, Robert wrote:


I am having the following set of data. 14000 rows.


A B
1010071 80425
1010071 80253
1010071 80425
1010071 80253
1010083 80451
1010083 80205
1010083 81853
1010083 80451
1010083 80205
1010083 81853
and so on...


What I want to is this:


Make a colum for C: Looking like this:


1010071
1010083
and so on.. = peace of cake and is done.


But now is the problem.


Behind this colum I want some colums holding the data for B.


Looking like this


1010071 80425 80253
1010083 80451 80205 81853 80451
80205 81853
and so on....


I am having absolutely NO IDEA how to fix this one. any help would be
welcome since doing this by hand is too much..I am pretty familiar
with excel ( and a little with VBA)


Thanks for any advice.


Robert


Hi
1.Do text to columns, using the space to seperate them. Soppose the
data is now in columns A and B and starts in row 1
2. Type this formula in C1
=IF($A16=$A15,B16,"")
3. Drag the formula down column C
4. If there are any none blanks in column C, drag the formula to
column D. Repeat until you have a column of blanks
5. Copy all your data and paste special...values to where it is, so
that you remove the formulas.


regards
Paul- Hide quoted text -


- Show quoted text -


Oops
Forgot to add the filtering bits:


0. Highlight the two columns, and do an advanced filter...choose "copy
to another location" and select unique items. Choose the Copy To cell
on a new sheet in A1
...
and
6. Highlight column A and do another advanced filter...choose "Filter
the list in place" and select unique items
7. Copy the filtered data to a new location and you are done.


regards
Paul- Hide quoted text -


- Show quoted text -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining Lookup function and Sum function Cameron Excel Worksheet Functions 2 July 13th 09 02:19 AM
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU JCC Excel Discussion (Misc queries) 5 June 26th 09 09:15 PM
Excel Data Validation/Lookup function does function correcty Kirkey Excel Worksheet Functions 2 May 25th 09 09:22 PM
how to combine an IF Function with a lookup function to determine [email protected] Excel Worksheet Functions 1 December 5th 06 06:09 AM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM


All times are GMT +1. The time now is 07:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"