+ Reply to Thread
Results 1 to 2 of 2

Sorting pivot data based on simple IF logic

Hybrid View

  1. #1
    Registered User
    Join Date
    01-07-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    1

    Sorting pivot data based on simple IF logic

    I'm currently trying to sort 2 variables nested in a pivot based on certain arguments.

    TL;DR for some context:

    Image best explains)

    https://i.stack.imgur.com/HKAV3.png

    L is pivot; N is desired output


    Sheet with Codes and Names attached to them - All codes have Len=4
    Codes can be unique and have only one name attached to them. In that case I want to sort the Code-Name as being "Single"
    Names do repeat themselves and are not individual to codes
    A code with different multiple Names needs to be sorted as "Multiple"
    A code with identical multiple Names needs to be sorted as "Single"
    I have used a & and Countif to address duplicate names with a uniqued identifier

    At the moment I'm quite stuck and unsure how to proceed. Based on the logic i tried=IF(LEN(A4)=4,A4,IF(AND(OR(LEN(A3)=4,OR(LEFT(A4,10)=LEFT(A3,10),LEFT(A4,10)=LEFT(A5,10))),OR((LEN(A5)=4),A5="")),"Single","Multiple"))

    output fails to return Single/Multiple when bullet 5.

    Hope I gave enough insight. Any idea would help.

    Thank you

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sorting pivot data based on simple IF logic

    Attach a sample Excel workbook (not a picture!). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

+ 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] Vba logic to pull data from various workbooks based on date
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-20-2016, 10:50 AM
  2. Replies: 1
    Last Post: 12-16-2015, 01:04 PM
  3. [SOLVED] Simple Formula, cant get logic to work
    By cdotyii in forum Excel General
    Replies: 3
    Last Post: 07-31-2015, 09:32 AM
  4. Simple copy pest data with logic
    By arindamsenaxa in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-12-2015, 02:29 AM
  5. [SOLVED] Simple multiple logic test help
    By rexy69 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2014, 11:31 AM
  6. Replies: 1
    Last Post: 08-04-2011, 02:18 PM
  7. Simple Copy-Paste logic not working
    By Brian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2005, 02:40 PM

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