+ Reply to Thread
Results 1 to 5 of 5

Key (Formula Adjustment)

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Key (Formula Adjustment)

    Hi,

    In the attached spreadsheet I have a key which will assign a unique ID based on this formula

    Please Login or Register  to view this content.

    The formula looks for an instance of "*" but I need this amending so it would assign the key based on at least a double star "**"

    e.g. Currently Cell A4 is:
    212011 Sales in Cnt to PPE* Total Sales

    But I need this to be:
    212011 Sales in Cnt to PPE** Gross Segmental Sales

    It could be that there are instances of 3 stars or 4. If this is the case I would want it returned with the 3 or 4 stars (it doesn’t have to be exactly 2 stars but it needs to be 2 or more)

    I have attached the spreadsheet

    Anyone help?
    Attached Files Attached Files
    Last edited by pauldaddyadams; 10-21-2010 at 03:09 PM. Reason: Spelling

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Key (Formula Adjustment)

    =B4&INDEX(B4:B$37,MATCH("~*~**",B4:B$37,0))

    (Not required to use code tags for formulas, only for VBA.)
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Key (Formula Adjustment)

    Quote Originally Posted by 6StringJazzer View Post
    Not required to use code tags for formulas, only for VBA
    @6SJ - this is true from a Rules perspective but the board software is such that long formulae are subject to "ghost" spaces mid formula

    I and a few others always post formulae within CODE tags for this reason (regardless of length).

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Key (Formula Adjustment)

    @DonkeyOte: Much obliged for the tip!

  5. #5
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Key (Formula Adjustment)

    Thank you!! That worked, although it highlighted another problem, Doh!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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