+ Reply to Thread
Results 1 to 4 of 4

Create an index keeping original index reference and appending new where necessary

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Create an index keeping original index reference and appending new where necessary

    I am trying to index a series of arrays in which some products have index numbers and some not. Where index numbers exist, I need to keep these and just give the unindexed products the next reference number. The attached workbook has some examples which might explain it a bit better.

    Grateful any help - it appears this cannot be resolved formulaically.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-14-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Create an index keeping original index reference and appending new where necessary

    'load range to array
    sourcearray = Range(blah)
    'specify first number in index
    startnum = 1
    'get record count from source array
    RecordCount = UBound(sourcearray)

    'map index column
    sourceindex = 2

    For startindex = startnum To RecordCount + startnum
    If IsEmpty(sourcearray(startindex - startnum + 1, sourceindex)) Then sourcearray(startindex, sourceindex) = startindex
    Next

    Range(blah) = sourcearray

  3. #3
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Re: Create an index keeping original index reference and appending new where necessary

    Thanks for that - I am adapting it to suit the arrays. I appreciate your help.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,396

    Re: Create an index keeping original index reference and appending new where necessary

    There is a formula solution in your other thread.

    http://www.excelforum.com/showthread...76#post4399376
    Dave

+ 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. [SOLVED] Create an index keeping original index reference and appending new where necessary
    By BRISBANEBOB in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2016, 01:34 PM
  2. [SOLVED] Index un-indexed items keeping original index numbers where they exist
    By BRISBANEBOB in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-25-2016, 03:55 AM
  3. Replies: 0
    Last Post: 08-07-2015, 08:44 PM
  4. Replies: 9
    Last Post: 04-12-2015, 07:20 PM
  5. [SOLVED] Copying Formulas Between Worksheets While Keeping Reference to Original Worksheet
    By PandaBear2014 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-04-2014, 06:32 PM
  6. [SOLVED] Copy formulas from one spreadsheet to another keeping the original sheet cell reference
    By Sheepdog in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-08-2012, 02:41 PM
  7. Replies: 5
    Last Post: 04-18-2010, 11:06 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