+ Reply to Thread
Results 1 to 20 of 20

Transposing Complex Data into Usable Format

  1. #1
    Registered User
    Join Date
    11-12-2021
    Location
    Swindon, England
    MS-Off Ver
    MS365 - Excel for Mac
    Posts
    15

    Transposing Complex Data into Usable Format

    Hi All,

    I know there are plenty of super intelligent excel wizards on here so im hoping for some help.

    I have a file which has hundreds of site IP & Subnet information and Site ID's that isnt presented in the most helpful way. Im looking to take the information which is in multiple rows/columns and need them transposing into multiple columns but the information is not easy to manipulate (IMHO). I have looked at "transpose" but its not working as i need and im at a loss.

    Attached is a spreadsheet with "Current" how it is now" and "How Id Like It To Be".

    Hoping someone can help get the information to where i need it to be.

    Thanks all
    Craig
    Attached Files Attached Files
    Last edited by AliGW; 03-20-2022 at 05:54 PM. Reason: Title changed - please think more carefully about your thread titles in future!

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,227

    Re: Really Tricky Excel Formula Needed....... HELP PLEASE :(

    Hi Craigc,

    We'd love to help but that darn spreadsheet isn't attached. Sometimes it is too big and you need to trim it down a bit to have it fit. We're waiting for a fun problem. My guess is Pivot Tables but need to see what you have.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Really Tricky Excel Formula Needed....... HELP PLEASE :(

    I think you forgot to attach the file. The instructions in the yellow banner at the top of the screen tell you how to do this - do NOT try to use the Paperclip icon, as it doesn't work on this forum.

    Pete

  4. #4
    Registered User
    Join Date
    11-12-2021
    Location
    Swindon, England
    MS-Off Ver
    MS365 - Excel for Mac
    Posts
    15

    Re: Really Tricky Excel Formula Needed....... HELP PLEASE :(

    Hey MarvinP,

    Thanks for replying - yeah the drop down didnt seem to work for adding an attachment but got one in there now. Hoping you can help - really appreciate the quick reply already

    Thanks
    Craig

  5. #5
    Registered User
    Join Date
    11-12-2021
    Location
    Swindon, England
    MS-Off Ver
    MS365 - Excel for Mac
    Posts
    15

    Re: Really Tricky Excel Formula Needed....... HELP PLEASE :(

    Hey Pete_UK - your absolutely right about the paperclip.... - think its uploaded now.

    THanks for the reply already
    Craig

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,227

    Re: Really Tricky Excel Formula Needed....... HELP PLEASE :(

    OK craig,

    Your data isn't good for doing Excel work with it. I've switched the data around a bit and used a newer XLookup() function on it. I'm not too proud of my answer, but it works. You will need to put the 1s and 2s above the table and use that helper column also. Keep asking and one of the smart Guru's will give ya a better answer.
    XLookup using 2 columns.xlsx

  7. #7
    Registered User
    Join Date
    11-12-2021
    Location
    Swindon, England
    MS-Off Ver
    MS365 - Excel for Mac
    Posts
    15

    Re: Really Tricky Excel Formula Needed....... HELP PLEASE :(

    Thanks for the reply MarvinP. Looks like the second site ID 2345 isnt pulling the right info. This one should be pulling for VLAN 10 - 10.10.10.16 and VLAN 20 should be pulling 10.10.20.32 - seemed to be pulling the same as site ID 1234.

    As noted the data is in an awful format with Site ID in completely the wrong place to easily do XLOOKUPs against in my opinion which doesnt help - this data will essentially be feeder info hence i need it in my column format.
    Thanks for looking

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Really Tricky Excel Formula Needed....... HELP PLEASE :(

    I've used a helper column to identify the relevant part of the file, using this formula in E4:

    =IF(A4="Site ID",MAX(E$3:E3)+1,IF(RIGHT(B4,2)="10",MAX(E$3:E3)&"_10",IF(RIGHT(B4,2)="20",MAX(E$3:E3)&"_20","-")))

    Copy this down to below your data. I've shifted your other table over a few columns, for reference, and used this formula in G5:

    =IF(ROWS($1:1)>MAX($E:$E),"",INDEX($C:$C,MATCH(ROWS($1:1),$E:$E,0)))

    and this in H5:

    =IF($G5="","",IFERROR(INDEX($C:$D,MATCH(ROWS($1:1)&"_"&IF(COLUMNS($H:H)>2,"20","10"),$E:$E,0),MOD(COLUMNS($H:H)-1,2)+1),""))

    The formula in H5 can be copied across into I5:K5, and then the block of formulae in G5:K5 can be copied down as far as you need them.

    Hope this helps.

    Pete
    Attached Files Attached Files

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,227

    Re: Really Tricky Excel Formula Needed....... HELP PLEASE :(

    Hi Craig,

    Power Query might be able to do the job. Do you get a sheet daily? Are there more than 5 columns in your data? If so then I'll try a PQ answer.

    Ok - did a Power Query Answer in the attached after reading:
    https://www.myonlinetraininghub.com/...0d17e333b1981b
    I used method 2.
    Power Query Merge using Offset Indexs.xlsx
    Last edited by MarvinP; 03-20-2022 at 05:09 PM.

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,920

    Re: Really Tricky Excel Formula Needed....... HELP PLEASE :(

    Col G (old) array formula:
    Please Login or Register  to view this content.
    H5:J7
    Please Login or Register  to view this content.
    Ben Van Johnson

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,273

    Re: Transposing Compkex Data into Usabke Format

    Administrative Note:

    Members will tailor the solutions they offer to the version (NOT release number) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are still new here, I have done it for you this time.)
    Last edited by AliGW; 03-21-2022 at 03:51 AM. Reason: Typo fixed.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  12. #12
    Registered User
    Join Date
    11-12-2021
    Location
    Swindon, England
    MS-Off Ver
    MS365 - Excel for Mac
    Posts
    15

    Re: Transposing Complex Data into Usable Format

    Hey Pete_UK,

    Many Many thanks for this - it has pretty much done exactly what i needed..... took me a little while to modify the formulas for how my form is lead out but i got there in the end.

    I do have one further question on the below - the last formula is i think only look at 2 variables - a 10 & 20. I have another form i wish to use this on but i have 4 vlans a 10, 20, 30 & 40 - i have tried slightly editing this but it seems to say to many arguments..... clearly im no expert but can you tweak for formula so i can have 4 different vlans?

    Many many thanks once again
    Craig

  13. #13
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,227

    Re: Transposing Complex Data into Usable Format

    Hi Craig,

    I was worried that you would have 30 and 40 so I still think an extension of the Power Query is what you really want. I hope Pete can work an answer for you, but it might be time to learn a little PQ.

  14. #14
    Registered User
    Join Date
    11-12-2021
    Location
    Swindon, England
    MS-Off Ver
    MS365 - Excel for Mac
    Posts
    15

    Transposing Complex Data into Usable Format

    Hey MarvinP,

    Thanks for your reply - I did start to attempt looking at this but it got quite late and I have Excel for Mac so found it different windows etc so it's a little more difficult to work out what to do - don't suppose you have any other guides at all?

    As you can tell - fairly inexperienced wity excel.

    Thanks
    Craig
    Last edited by AliGW; 03-21-2022 at 03:52 AM. Reason: PLEASE don't quote unnecessarily!

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,273

    Re: Transposing Complex Data into Usable Format

    Administrative Note:

    For the second time of asking, Craig ...

    Members will tailor the solutions they offer to the version (NOT release number) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Attached Images Attached Images
    Last edited by AliGW; 03-21-2022 at 04:23 AM. Reason: Instructional graphic added.

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Transposing Complex Data into Usable Format

    Are there ALWAYS 4 vlans per site... or sometimes 2... sometimes 3...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Transposing Complex Data into Usable Format

    No reply... so this is for the Q as asked:

    to return site ID:

    =FILTER(C5:C24,A5:A24="Site ID")

    to return the vlan nos.

    =INDEX(INDEX($C$5:$D$22,MATCH($G12,$C$5:$C$22,0)+2,):INDEX($C$5:$D$22,MATCH($G12,$C$5:$C$22,0)+4,),INT(SEQUENCE(,4,,1/2)),1+MOD(SEQUENCE(,4,0),2))

    see first file. If there are ALL 4 vlans present you can the same first formula (with a longer range, as needed), and:

    =INDEX(INDEX($C$5:$D$26,MATCH($G14,$C$5:$C$26,0)+2,):INDEX($C$5:$D$26,MATCH($G14,$C$5:$C$26,0)+6,),INT(SEQUENCE(,8,,1/2)),1+MOD(SEQUENCE(,8,0),2))

    see second file.

    If it is sometimes 2, 3, or 4... then provide a REALISTIC sample file.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    11-12-2021
    Location
    Swindon, England
    MS-Off Ver
    MS365 - Excel for Mac
    Posts
    15

    Re: Transposing Complex Data into Usable Format

    Apologies - version update to reflect Microsoft Excel for MAC.

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,273

    Re: Transposing Complex Data into Usable Format

    Not quite there yet! Which version is it? Please see my instructions about how to find out. I am looking for something like MS365 in your profile.

  20. #20
    Registered User
    Join Date
    11-12-2021
    Location
    Swindon, England
    MS-Off Ver
    MS365 - Excel for Mac
    Posts
    15

    Re: Transposing Complex Data into Usable Format

    Hi Glenn,

    The initial need was for a list of sites which should only have 2 vlans in general. This is why my initial info was set like this - i was then hoping i could adjust myself if moving this up to 3 or 4 or 5 VLANs, etc.

    However using your File 2 option - this appears to have been exactly what i needed. This has given me now the information in a much more usable fashion.

    Massive thank you for your assistance here and apologies for the delay in replying - i somehow missed your reply.

    Many Many thanks again
    Craig

+ 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] Tricky formula help needed
    By tomatoboy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-21-2016, 03:04 AM
  2. Formula to correctly allocate monthly tuition fees between 2 months
    By Karmak84 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-11-2015, 06:03 AM
  3. [SOLVED] A moderately tricky lookup formula needed...
    By James C in forum Excel General
    Replies: 3
    Last Post: 03-12-2013, 12:51 PM
  4. Tricky formula needed to format multiple columns into one cell
    By joejnknsn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-17-2012, 06:00 PM
  5. Excel 2007 : Excel date formula (tricky)
    By priceless07 in forum Excel General
    Replies: 2
    Last Post: 08-03-2010, 07:46 AM
  6. Tricky Formula needed
    By GREGNORMAN1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-13-2009, 11:55 AM
  7. Help with tricky formula needed
    By cashbagg in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-15-2008, 08:49 PM

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