Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

excel

ResolvedVersion 2007

John has attended:
No courses

Excel

Hi, I have a column of cells that i need to rearrange into a new column. I will be entering the serial numbers into the new column manually. What i would like to do is.
As i have typed the number into the cell and press enter, I would like excel to compare the number with all the numbers in the original column and if it finds the same number i would like the original number to be deleted or changed into a new colour or have the cell colour changed.
So at the end all i see in the original column is the cells which do not match any the cells in the new column.
I know this means that each cell in the new column has to be compared with the every cell in the original, but i am stuck on where to go from here.
Many thanks in advance for any help you can provide.
John

RE: Excel

Hi John,

Thank you for your question.

I believe this problem would have to be resolved with a Visual Basic Macro.

It is difficult to attain your level of knowledge as you haven't completed a course with us.

I have included some vba code that can be inserted into the visual Basic window as a Worksheet_Change event.

http://en.kioskea.net/faq/4698-excel-comparing-cell-a1-to-entire-a-column-in-sheet-2

With the link above at the end you could replace the answers with formats.

http://en.kioskea.net/forum/affich-190666-format-cell-based-on-another-macro

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("N1") = "G" Then Range("K1").Font.ColorIndex = 4
If Range("N1") = "A" Then Range("K1").Font.ColorIndex = 44
If Range("N1") = "R" Then Range("K1").Font.ColorIndex = 3
If Range("N1") <> "G" And Range("N1") <> "A" And Range("N1") <> "R" Then Range("K1").Font.ColorIndex = 1
End Sub


There are some good forums out there to search for such requests and I think Mr.Excel is a good forum.

I hope this helps.

Regards

Simon

Will be marked as resolved in 5 days

Notice: This is an automated message. Due to inactivity, this forum post will be marked as 'resolved' if there are no further responses in the next 5 days.

Thu 23 Sep 2010: Automatically marked as resolved.

Excel tip:

Formst Excel to display leading zeroes

Select the cells that you want to have displaying leading zeroes.

From the 'Format' menu select 'Cells' (Or Right-click on the selected range and and select 'Format Cells').

In the 'Number' tab click on 'Custom' in the 'Category' window.

In the 'Type:' box enter zeroes that correspond to the size of the required number (eg 5 zeroes).

Click OK.

When you enter numbers into these cells, leading zeroes will be displayed.

eg 123 = 00123

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.