Need to sort Column I and leave B alone down sheet Macro

zone709

Well-known Member
Joined
Mar 1, 2016
Messages
2,079
Office Version
  1. 365
Platform
  1. Windows
Hi need to sort rows for column I where ever it says bill in Column C. I need the titles in Column B not to disappear but also need to delete any rows in column I that dont have
555 10thave. I gave a before and after example thanks.


Example

Book1
ABCDEFGHIJKLMNOPQ
1TypeDateNumNameDue DateAgingAmountOpen Balance
2Company, Inc.
3Bill12/31/201912345555 10thave1/30/20206110.0010.00
4Bill12/31/201912346555 10thave1/30/20206115.0015.00
5Bill1/31/202012347555 10thave3/1/20203025.0025.00
6Bill1/31/202012348Drums3/1/20203031.6731.67
7Bill1/31/202012349Drums3/1/20203039.1739.17
8Bill1/31/202012350555 10thave3/1/20203046.6746.67
9Bill2/29/202012351Drums3/30/2020154.1754.17
10Bill2/29/202012352555 10thave3/30/2020161.6761.67
11Company, Inc.283.33283.33
12Equipment Rental
13Bill2/20/202012546555 10thave3/21/2020105,988.135,988.13
14Bill2/25/202012547Drums3/26/20205276.36276.36
15Bill3/3/202012548Drums4/2/20202,177.502,177.50
16Bill3/3/202012549555 10thave4/2/20201,306.501,306.50
17Bill3/26/202012550555 10thave4/25/202014,076.2014,076.20
18Bill3/26/202012551Drums4/25/20207,283.077,283.07
19Equipment Rental31,107.7631,107.76
Sheet1
Cell Formulas
RangeFormula
O11, Q11O11=ROUND(SUM(O2:O10),5)
O19, Q19O19=ROUND(SUM(O12:O18),5)



Results

Book1
ABCDEFGHIJKLMNOPQ
1TypeDateNumNameDue DateAgingAmountOpen Balance
2Company, Inc.
3Bill12/31/2019161848555 10thave1/30/20206110.0010.00
4Bill12/31/2019161849555 10thave1/30/20206115.0015.00
5Bill1/31/2020163936555 10thave3/1/20203025.0025.00
6Bill1/31/2020163939555 10thave3/1/20203046.6746.67
7Bill2/29/2020166041555 10thave3/30/2020161.6761.67
8Company, Inc.158.33158.33
9Equipment Rental
10Bill2/20/20201094005-0007555 10thave3/21/2020105,988.135,988.13
11Bill3/3/20201096067-0008555 10thave4/2/20201,306.501,306.50
12Bill3/26/20201117838-0002555 10thave4/25/202014,076.2014,076.20
13Equipment Rental21,370.8321,370.83
Sheet1
Cell Formulas
RangeFormula
O8, Q8O8=ROUND(SUM(O2:O7),5)
O13, Q13O13=ROUND(SUM(O9:O12),5)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi any help with this for a macro. Need to just actually delete any rows that don't have 555 10thave in Column I. Without disturbing the sheet especially in Column B.
 
Upvote 0
How about
VBA Code:
Sub Zone709()
   With ActiveSheet
      .Range("A1:I1").AutoFilter 9, "<>555 10thave", xlAnd, "<>"
      .AutoFilter.Range.Offset(1).EntireRow.Delete
      .AutoFilterMode = False
   End With
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,212
Messages
6,123,651
Members
449,111
Latest member
ghennedy

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