How to set column as readonly on Gridview?

In excel 2007, i have 200,000 values in column a and have another set of 120,000 values in column b. how do i?

  • all of the column B values are randomly taken from column A. i need to get all of the values from column A that are not also in column B and put them in column C. for example: A.......B.......C v x.......z y.......y z turns into for example: A.......B.......C v................. x.......z........x y.......y........ z................. thank you in advance for any help

  • Answer:

    Edit: This will make a compact, consecutive, list of the numbers beginning in C2, not spread out through the entire 200,000 rows. Here is a way to do as you wish by double clicking any cell. Copy the following event handler to the clipboard (highlight the entire code, right click in the highlighted area, and 'Copy'): Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) Dim i, j, LastRow LastRow = Range("A" & Rows.Count).End(xlUp).Row Columns("C:C").ClearContents Range("C1").Value = "Not in Column B" Columns("C:C").AutoFit For i = 1 To LastRow If Application.CountIf(Range("B:B"), Cells(i, "A")) = 0 Then Range("C" & Rows.Count).End(xlUp).Offset(1).Value = Cells(i, "A").Value End If Next End Sub Select the worksheet containing your data and right click the sheet tab at the bottom. Select 'View Code' Paste the event handler into the white editing area to the right (right click in the area and 'Paste'). Close the VBE (red button w/white 'x'). Double click any cell to create the extracted list in column C. If the data changes, simply double click again to create a new, clean, list. Note: In your example, I believe 'v' should also have been listed in column c.

FBcharle... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Enter this in column C and copy down the column. All the numbers that are not in column B but are in column A will be listed in column C. =IF(COUNTIF(B:B,A1)<1,A1,"")

Scrawny

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.