+ Reply to Thread
Results 1 to 4 of 4

Display a sting of consecutive numers, then the rest

  1. #1
    Registered User
    Join Date
    07-08-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    2

    Display a sting of consecutive numers, then the rest

    Hello all. This is my first post and I'm looking for some assistance. I need to take data in this format (1) (2) (3) (4) (5) (6) (7) (8) (10) (13) (16) (18) and display it in this format (1-8), (10) (13) (16) (18).

    Thank you. Your assistance is greatly appreciated.

  2. #2
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: Display a sting of consecutive numers, then the rest

    Is each number in a different cell? Can you upload an excel file with the data as you currently have it? Do you only need to do this once with these numbers? Or will the numbers change?

  3. #3
    Registered User
    Join Date
    11-02-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Display a sting of consecutive numers, then the rest

    Hi there,

    if I understand you correctly (which I might not) the formula to reformat 1-8 will be this: =IF(LEN(D4:K4=8),CONCATENATE(D4,"-",K4),"")

    The other formulas for 10,13,16,18 will look like this: =IF(D6<>"",L4). I have created a spreadsheet to better demonstrate how these might work for you, and uploaded it to this reply.

    Hope this helps.

    Oscar.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-08-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    2

    Re: Display a sting of consecutive numers, then the rest

    Yes! So the formula in place now references data from another sheet and concatenates it. I need to combine the formula that is in place now with the formula that Oscar provided. The current formula is: =IFERROR(IF(VLOOKUP(D8,[workbook_name]sheet_name!$H:$I,1)<>D8,"",VLOOKUP(D8,[workbook_name]sheet_name!$H:$I,2)),"")

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Referencing old numers to new
    By gamcroberts in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-24-2014, 04:17 PM
  2. generating 4 digit numers (help!)
    By excellerating in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-23-2012, 09:06 AM
  3. [SOLVED] Count consecutive non-zero values; list first non-zero value; display counts as an array
    By treznick in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-17-2012, 08:25 PM
  4. Macro : To find word and Select rest after this cell and delete rest
    By Zortabello in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2010, 08:06 AM
  5. Replies: 1
    Last Post: 07-21-2006, 12:05 AM

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