Results 1 to 9 of 9

Formula to sort by road name first, then by house number

Threaded View

  1. #1
    Registered User
    Join Date
    10-22-2021
    Location
    Manchester
    MS-Off Ver
    365 for Web Apps
    Posts
    4

    Formula to sort by road name first, then by house number

    Hi all, I've got a bit of an issue with a spreadsheet for work. They want to sort the columns on a report by the road name then by the house number, but the address is recorded as 1 ABC Road for example. I got a formula that mostly works for that, however we have one property that is 150/152 & 154/158 Dave Road and this formula is picking up the & and using that to sort, bringing it to the front of the list. The full addresses are in row 6, and the formula below is in row 7.

    =IF(ISERROR(VALUE(LEFT(B6,1))),B6,MID(B6,FIND(" ",B6)+1,LEN(B6)-FIND(" ",B6)))

    Row 7 then includes just the road names for most of the properties, except '150/152 & 154/158 Dave Road' which shows as '& 154/158 Dave Road'. I'm currently using row 7 to sort.



    The next issue, that the formula doesn't help with, is that they then want each group of properties sorted by number so: 1... 2... 3... 10... 11... not 1... 10... 11... 2... 3... as Excel is doing.

    I've uploaded the same spreadsheet twice - once in .xls once in .xlsx using fake data but giving you an idea of the addresses we need to sort and my current formula in row 7 so you can see what that does as I don't know if I explained it well.

    If anyone has any ideas at all I'll appreciate it so much. It could be one long formula that we'd just copy and paste into each report or even two separate formula to put the road name in one row and the number in the next, then running a sort function on the roan name row followed by the number row. I've personally hit my limit and I'm not even sure how I created that formula in the first place!

    Thanks
    Last edited by hmmm1989; 10-22-2021 at 09:11 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA code for advance filter take user input for house to house and criteria age >= 60
    By Vsinghgehlot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2021, 08:37 AM
  2. get company number and address from uk companies house
    By tek9step in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2021, 07:25 AM
  3. Replies: 15
    Last Post: 07-19-2019, 07:04 AM
  4. [SOLVED] insert bonus and house hold number
    By mathanraj76 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-04-2014, 05:56 AM
  5. [SOLVED] Counting the number of Guests to be In House on a certain day.
    By JJohnsey in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-23-2013, 02:37 PM
  6. [SOLVED] Extracting street name and house number from address list
    By Mikey7346 in forum Excel - New Users/Basics
    Replies: 17
    Last Post: 10-26-2012, 07:20 PM
  7. Replies: 9
    Last Post: 09-18-2008, 08:53 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1