how to get differences?

jamiguel77

Active Member
Joined
Feb 14, 2006
Messages
378
Office Version
  1. 2016
  2. 2010
  3. 2007
Platform
  1. Windows
  2. Web
IdQtyFruitStatus
1​
2​
Orange
0​
2​
3​
Cherry
0​
3​
4​
Bannana
0​
4​
2​
Grape
0​
5​
5​
Apple
1​
6​
2​
Cherry
1​
7​
3​
Orange
1​
8​
4​
Bannana
1​
9​
2​
Grape
1​
10​
4​
Arpicot
1​

How to get difference comparing: qty, fruit and status
in this case:

3 Cherry
2 Cherry

5 Apple

2 Orange
3 Orange

4 Airpicot


Any advice?


Dude: where can download the macro for install in my excel and paste here.

Thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Code:
Sub Maybe()
Dim dat, lc As Long, lr As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
lc = Cells.Find("*", , , , xlByColumns, xlPrevious).Column
dat = Range("A1:D" & lr).Value
Application.ScreenUpdating = False
    Range("A1:D" & lr).Sort Key1:=Range("C1"), Header:=xlYes
        Cells(1, lc + 2).Resize(lr, 2).Value = Cells(1, 2).Resize(lr, 2).Value
    Cells(1, 1).Resize(UBound(dat), 4) = dat
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Dude: where can download the macro for install in my excel and paste here.
If you mean the Excel sheet. Then below is the standard blurb.
If you are on the XL2BB page the download button is in the top right corner.


XL2BB
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,215,507
Messages
6,125,212
Members
449,214
Latest member
mr_ordinaryboy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top