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

searching corresponding input tw

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Searching for corresponding input in two (or more) columns

Searching for corresponding input in two (or more) columns

ResolvedVersion 2003

Lisa has attended:
Excel Intermediate course

Searching for corresponding input in two (or more) columns

Hi,

I was on the intermediate course last week, and have come accross a problem which I think could probably be solved using excel.

We currently have a spreadsheet which contains several columns of data. We need to make sure that for every row, if there is a 'B' in column C, this should correspond to an 'S' in colum J.

Is there a feature in Excel which would highlight any rows where this is not the case?

Thank you in anticipation.

Best wishes
Lisa Baum

RE: Searching for corresponding input in two (or more) columns

Hi Lisa,

You could use Conditional Formatting.

This is the formula:
=IF(AND(($C1="B"),($J1<>"S")),TRUE,FALSE)

Now click on cell A1. Go to Format menu -> Conditional Formatting. Under 'Condition 1' section, change the dropbox containing 'Cell Value Is' to 'Formula Is'. Now paste the formula above.

What this is saying is if cell C1 is equal to B and cell J1 is not equal to S, then return 'true' (in other words, DO colour this cell).

Then click on the 'Format...' button and select your desired formatting (eg. red background, see Patterns tab). Press OK when done. Then OK to close the Conditional Formatting box.

Now you need to copy the formatting (includes conditional formatting) to all the other cells. Do this by first ensuring cell A1 is still selected. Press the 'Format Painter' button on your toolbar (see attached screenshot of this if you're not sure). Cell Cell A1's border should now be flashing to indicate you have copied something from it. Now highlight the whole of row 1 only. The formatting will be applied.

Now select all of row 1, and press the 'Format Painter' button again. The whole row should have a flashing border. Now, with the mouse highlight the remaining rows in your spreadsheet.

The formula is updated for each row you copy. Because you used a dollar sign before the C and J, Excel remembers the column, but updates each row automatically.

See attached spreadsheet for a working example. (to see conditional formatting on a cell, select it and go back to Format -> Conditional Formatting).

Any questions, please ask.

Hope this helps. If this is what you're after, please mark this question as resolved.

Regards, Rich

Attached files...

format-painter-screenshot.gif
highlight-b-s.xls

Mon 17 Aug 2009: Automatically marked as resolved.

 

Training courses

Training information:

See also:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

##### displaying in Excel

When you get a series of hash symbols (####) appearing in some of your cells in a spreadsheet, this can make you think that you've make some kind of mistake.

This is a common misconception - what this actually means is that the cell is not wide enough to fully display the content of the cell.

All you need to do to see what is actually in the cell is to widen the column that the cell is in.

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.11 secs.