Alpha numeric sorting across tabs

jrobertsandco

New Member
Joined
Sep 12, 2011
Messages
6
I am making a master inventory sheet for my Real Estate Company. I have created 5 tabs to track the data for each department. The tabs are as follows:

  • General Property Info
  • Agent Action Items
  • Accounting Action Items
  • C2C Action Items
  • 2011 Closed Files
I was able to create the following code to auto sort on the General Property info tab:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 1 Then Exit Sub
Range(("A6:j6"), Cells(Rows.Count, 1).End(xlUp)).Sort Key1:=Range("A7:j7"), Order1:=xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:=True, Orientation:=xlTopToBottom
End Sub


This works great for the first tab, however although the other tabs populate the information on the general property information tab, the colums to the right of that info do not sort with the first tab.

Can anyone help? Am I explaining this well enough? lol
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
By tabs do you mean sheets.
Maybe the other sheets cannot see the private sub.
You could try pointing at the

Code:
Worksheets("name").Range(("A6:j6"), Cells(Rows.Count, 1).End(xlUp)).Sort
 
Upvote 0
Actually I am not really very familiar with this, however at a laymans guess the other sheets are not seeing the code.

Since there are only five sheets add the code to every sheet in the private sheet modules , Under Microsoft Excel Objects, in the Visual Basic Editor Project Explorer.

You code does not appear to have any reference to another sheet.

Maybe you have already done this but you have not specified.

cheers
 
Upvote 0
Ok just looking at the code
  • You have the General info tab which has columns of data
  • Your code uses the first column of data in the General info sheet and sorts that column alphabetically on data entry.
  • The rows to the right of that column are sorted according to the first column, so you are sorting multiple columns based on one column's data.

I have placed the code in the every sheet object under the Project Explorer in VBE (In every sheet, which would be the five you mentioned). Or click on sheet tab go >"view code"

It works fine if you do this.

Or are you wanting the data on 4 sheets to be sorted based on the sorting of the general info sheet?

In other words you want the sorting to work across the 5 sheets relative to the first sorted row in General info?
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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