Search : in
By :

Conditional formatting and transpose

Last answer on Jul 21, 2009 4:29:19 am BST lizzy, on Jul 16, 2009 3:16:01 pm BST 
 Report this message to moderators

Hi,

Can someone please help me with the following problem...

I need to compare two sets of data and if they do not match, one of the two values should be coloured in red. The problem however is, that one set of figures is contained in a row while the other one is stated in a column - I will try to explain that in detail now.

I have a table with Export Countries - e.g. Germany exports to Belgium 123, Germany to Denmark 345, Germany to Spain 678 and so on (the countries to which the export goes is in the first column; the exporting country is a header of the row) => data is in a column

Exports Germany Belgium Denmark Spain
Germany 0
Belgium 123
Denmark 345
Spain 678

The other table is Importing Countries - e.g. Belgium imports from Germany 123, Denmark from Germany 345, Spain imports from Germany 678 etc. (in this case the first column contains all the countries from where the import is coming and the headers are the importing countries) => data is in a row

Imports Germany Belgium Denmark Spain
Germany 0 123 345 678
Belgium
Denmark
Spain

Thus, the imports of one country have to match with the export from the other country.

Which formular can I apply for getting the desired result, which is, colouring the import values that do not match with the export values from the respective country.

I hope you understand what I mean...

I would be really very grateful if anyone could help me finding the solution. (If possible I would like to avoid using VBA.)

Thank you so much :)

Configuration: Windows XP Internet Explorer 7.0

Best answers for « conditional formatting and transpose » in :
Avoid duplicates in Excel ShowAvoid duplicates in Excel In order to avoid duplication when encoding in a column from an excel sheet: take the conditional format on the first cell under the headings (eg A2) choose the following formula:...
Unlimited Conditional Formatting ShowUnlimited Conditional Formatting Introduction Principle Code Introduction The limitation of MFC (Conditional Formatting) to Excel version 2007 is less than 3. This is very short. Having seen many applications to push the limit, I am...
Colouring cells on conditions ShowColouring cells on conditions There are many pratical functions under Excel which is not commonly used. Example: If you wish a cell automatically turns red (or other formatting border, frame etc) under one condition: a result, a...
Download HP USB Disk Storage Format Tool ShowHP USB Disk Storage Format Tool is a small utility allowing to format a key USB or READER MP4. It also allows to make a key (Bootable). This software works with all keys and readers MP4 of the market. To make work this utility under Windows...
Download Format Factory ShowFormat Factory is an application that allows conversion of various types of media files. It has various characteristics that allow you to customize a lot of stuff like: Convert video formats, audio and picture shows. Repair damaged files. Reduce...
Spreadsheets - Conditional expressions ShowWhat is a Conditional Structure? Conditional structures are instructions that allow to test if a condition is true or not. Conditional structures may be associated together. To successfully execute these tests using logical functions, spreadsheets...
MKV format (Matroska Video) ShowMKV format The MKV format (Matroska Video) is an entirely free video format. More precisely, it is a container (hence the name Matroska, in reference to the Russian dolls contained within another) making it possible to contain video (DivX, Xvid,...
Formatting - Formatting a hard drive ShowBefore trying to understand formatting, you first need to understand how a hard drive works. Many people do not distinguish low-level formatting (also called physical formatting) from high-level formatting (also called logical formatting). Even...

1

Excelguru, on Jul 17, 2009 5:33:03 am BST

Hello lizzy

Do a vlookup to get either of the figures to make both of them rowwise / column wise
then do a comparison in the near by column using if
The do a conditional formatting based on this cells value for the entire row /column Winners are losers who got up and gave it one more try. -Den­nis DeYoung
My Interests are financial Modelling and custom excel develo­pment.

Reply to Excelguru

2

lizzy, on Jul 17, 2009 6:56:40 am BST

Hi Excelguru,

Thanks for your reply! I'm so glad that there seems to be a solution for this :)

Would you be so kind as to go more into detail with your suggestion? And the thing is, the cells that contain the values are linked to another spreadsheet. So I don't really know how to include the filepath into the formular with the vlookup. (I think I'm doing something wrong here, but Excel Help is not really bringing me any further...)
What do you mean with the near by column? Unfortunately I'm no good with vlookup - that was the one I used to copy in exams... ;)

I would be soo grateful if you could explain it to me in a simple way :)

Have a great day!

Reply to lizzy

3

Excelguru, on Jul 17, 2009 8:37:41 am BST

Hello Lizzy

The syntax of vlookup is
VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)­
to get entries to a row
=vlookup(a1, sheet2!$a$1:$b$5,2,false) to get your data where sheet2!$a$1:$b$5 contains your data in columns

Open both the files then select the range in the formula.
Winners are losers who got up and gave it one more try. -Den­nis DeYoung
My Interests are financial Modelling and custom excel develo­pment.

Reply to Excelguru

4

lizzy, on Jul 20, 2009 2:05:51 pm BST

Hey :)

Thanks again!
After now having tried all kinds of vlookup-things and conditional formatting, I still have not been able to achieve the desired result. And I really do not want to do it manually... Please help me :)

I guess, I did not express myself very well enough... The two data tables are both in the same spreadsheet and the data is not in any order at all - so there is no chance of sorting it in an ascending or descending way. I guess this is what makes the vlookup difficult or impossible, as far as I have now figured that out.

And its still the problem of comparing vertical data to horizontal one - is there maybe a possibility to use the transpose function in combination with the conditional formatting?

If it cannot be worked out with Excel functions, maybe someone can help me finding a solution with VBA... I will be grateful for anything...

Thanks a lot!

Reply to lizzy

5

 Excelguru, on Jul 21, 2009 4:29:19 am BST

Just to inform you that vlookup does not require a sorted list Winners are losers who got up and gave it one more try. -Den­nis DeYoung
My Interests are financial Modelling and custom excel develo­pment.

Reply to Excelguru