Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default combining two columns of data

I have a column listing 10,000 part numbers.
I have a second column of P/N's that are obsolete and I need to delete these
P/N's from the first column.
In the past I had shaded my list of obsolete numbers, pasted them at the
bottom of the column of P/N's and sorted. Anywhere I saw a shaded P/N I
deleted two lines.
I'll be there all day with this list.
Any ideas on automating this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default combining two columns of data

One way:

PN's in column A
obsolete PN's in column E

Enter this formula in column B and copy down to the end of data in column A:

=ISNUMBER(MATCH(A1,E:E,0))

Select both column A and column B
Sort on column B ascending
This will place all obsolete PN's at the bottom of the list
Delete all rows at the bottom of the list where column B = TRUE
Delete column B

Biff

"DwwPRO" wrote in message
...
I have a column listing 10,000 part numbers.
I have a second column of P/N's that are obsolete and I need to delete
these
P/N's from the first column.
In the past I had shaded my list of obsolete numbers, pasted them at the
bottom of the column of P/N's and sorted. Anywhere I saw a shaded P/N I
deleted two lines.
I'll be there all day with this list.
Any ideas on automating this?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default combining two columns of data

With 10,000 # in column A and obsolete # in B try:

(Backup your w/sheet first!)

Sub Delete_Obsolete()

Dim ws1 As Worksheet
Dim irow As Long
Dim Lastrow As Long
Dim col As Integer
Dim delrng As Range

Set ws1 = Worksheets("Sheet1")


With ws1
Lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
Set delrng = .Range("B2:B" & .Cells(Rows.Count, "B").End(xlUp).Row)
For irow = Lastrow To 2 Step -1
If Application.CountIf(delrng, .Cells(irow, "A")) = 1 Then
.Rows(irow).Delete
End If
Next irow

End With


End Sub


"DwwPRO" wrote:

I have a column listing 10,000 part numbers.
I have a second column of P/N's that are obsolete and I need to delete these
P/N's from the first column.
In the past I had shaded my list of obsolete numbers, pasted them at the
bottom of the column of P/N's and sorted. Anywhere I saw a shaded P/N I
deleted two lines.
I'll be there all day with this list.
Any ideas on automating this?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default combining two columns of data

On Jun 25, 10:03 am, DwwPRO wrote:
I have a column listing 10,000 part numbers.
I have a second column of P/N's that are obsolete and I need to delete these
P/N's from the first column.
In the past I had shaded my list of obsolete numbers, pasted them at the
bottom of the column of P/N's and sorted. Anywhere I saw a shaded P/N I
deleted two lines.
I'll be there all day with this list.
Any ideas on automating this?


One way to do this is to use a VLOOKUP to identify which P/N's are in
the obsolete list.

For example, create a 3rd column with this formula in it =VLOOKUP(A1,$B
$1:$B$10000,1,0). This should return #N/A for non-obsolete values and
the P/N for the obsolete values. Then sort by the 3rd column to group
all of the numbers together and delete all of the entries that don't
show #N/A in the 3rd column.

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 Text from 2 Columns into 1 then Deleting the 2 Columns sleepindogg Excel Worksheet Functions 5 September 19th 08 12:36 AM
Combining data from two columns CLR Excel Discussion (Misc queries) 10 August 9th 06 09:21 PM
Combining data from two columns PCLIVE Excel Discussion (Misc queries) 0 August 2nd 06 08:10 PM
combining 2 columns of data Miss Dedly Excel Discussion (Misc queries) 1 January 12th 06 07:14 PM
Combining Data from Multiple Columns JT Excel Worksheet Functions 2 January 8th 06 07:39 PM


All times are GMT +1. The time now is 09:10 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"