Compare csv file and Oracle table and highlight differences using Excel - excel

I have a tab seperated csv file of around 50-80 rows (abc.csv) as follows
Column 1 Column 2 Column 3
A 1 XX
B 2 YY
and a table (tblSample1)in Oracle
Tcol 1 Tcol2 Tcol3
A 1 XX
B 2 ZZ
I would like to compare column 2 and 3 and highlight the difference in excel spreadsheet (which in this case is the following)
Column 1 Column 2 Column 3 Tcol 1 Tcol2 Tcol3
B 2 YY B 2 ZZ
What is the easiest way to compare the 2 and highlight the difference using excel vba?

If there are only 50-80 rows, wouldn't a vlookup work?
i.e.
Import both into excel
Use a vlookup to get B 2 YY & B 2 ZZ into a single row
Use a formula like if(a2<>a4, "error", "")

Related

How to Compare 2 excel sheet row wise where order of data is not fixed

Comparing 2 excel sheets where we need to find id and match next column and if difference then highlight the difference cell.
eg;
Sheet 1
123412 Bob Y
112234 Jill Y
998822 Carry Blank
Sheet 2
112234 Jill XX
998822 Carry Blank
123412 Jack ZZ
Here sheet 2, 123412 has different data in col2 and col4
Also, Sheet 2, 112234 has different data in Col3 when compared with sheet1
I need to highlight the cells so that difference can be identified easily.
There is huge amount of data.
Highlight, Sheet2- Jack, ZZ and XX cells and
Sheet1 - Bob, Y, Y(of Jill)

Excel Data convert from single row to multiple row

I have data in excel in following manner.
Colname Count
A 5
B 3
C 4
I want to convert it into this way.
A 1
A 2
A 3
A 4
A 5
B 1
B 2
B 3
C 1
C 2
C 3
C 4
Based on the count i want that data must be converted into rows with increasing order. Please let me know the feasiblity .
=IF(ROW()<B$1+1,"A",IF(AND(ROW()>B$1,ROW()<SUM(B$1:B$2)+1),"B",IF(AND(ROW()>SUM(B$1:B$2),ROW()<SUM(B$1:B$3)+1),"C",""))) in F1 and fill down. In G1, this formula =IF(COUNTA(F1)>0,COUNTIF(F$1:F1,F1),"") and fill down. Letters are in Column A and numbers in Column B. I chose these columns randomly to work a solution. Change to match your actual data, if needed.

Highlight cells based on the value of cells in another column

I have this problem as noted below:
Column A = Part number
Column B = Quantity
Column C = Part number
Column D = Quantity
Using conditional formatting, I would like to highlight if the combination of Part number and Quantity in Column A and B is different to the combination of Part number and Quantity in Column C and D.
Eg:
Col A Col B Col C Col D
1 1111 2 1112 5
2 1112 3 1111 2
3 1131 5 1112 5
4 1122 3 1131 2
To do this, I'd like to set up a couple of 'helper' columns (say E & F) by concatenating Column A & B, C & D.
So essentially, I'd like to take the information from the helper columns E & F, but use conditional formatting to highlight the cell in column B and D.
From the example above, cell B3 and D4 would be highlighted.
Is this possible, and if not, is there are simple alternative? (I don't mind using a macro if need be).
I would use COUNTIFS
For B1:B4
=COUNTIFS($C$1:$C$4,A1,$D$1:$D$4,"<>"&B1)
and for D1:D4
=COUNTIFS($A$1:$A$4,C1,$B$1:$B$4,"<>"&D1)
In case you even want to skip the helper columns, you could format A1 with =$A1&$B1<>$C1&$D1 and copy the format to any cells in you want to be highlighted (even to your helper columns).

Comparing two columns in excel, inserting blank rows moving associated data

I have a large set of data in excel that needs to be matched by column. Specifically, the data currently looks like:
Column 1 Column 2 Column 3
1 1 aaaa
2 3 bbbb
3 4 cccc
4
Ideally, I want the data to look like:
Column 1 Column 2 Column 3
1 1 aaaa
2
3 3 bbbb
4 4 cccc
I've looked at different ways of comparing Column 1 and Column 2 (similar to this), but haven't found a good way to a) insert the blank space where column 1 and 2 don't match and b) also attach the data in column 3.
Any help would be greatly appreciated! Thanks!
If you want / can use directly Excel:
In the cells of Col "D" put this formula:
=IFERROR(MATCH(A2;$B$2:$B$8;);"")
In the cells of Col "E" put this formula:
=IF(D2<>"";INDEX($B$2:$C$8;D2;1);"")
In the cells of Col "F" put this formula:
=IF(D2<>"";INDEX($B$2:$C$8;D2;2);"")
Copy and paste for all the cells.
The good think it's that it's autoupdated... Or when finish copy and paste with value.

Transpose colums to rows for each unique value in Excel

I have data in a spreadsheet that looks like this:
A 1
A 2
A 3
B 1
B 2
B 3
B 4
C 1
C 2
I want it to be like this:
A 1 2 3 *
B 1 2 3 4
C 1 2 * *
where each letter or number is in a seperate cell. The * indicates an empty cell.
I've started copying and pasting and checking 'transpose' in the paste special dialogue but had to give up because the spreadsheet is just too large to do it manually. I've been looking at this but it doesn't exactly fit my needs. Any suggestions?
Have you tried a PivotTable with labels (say Letter and Number) where Letter is in Row Labels, Number is in Column Labels and Sum of Number for Σ Values?

Resources