Posts by paspuggie48

    Agree VjBox, maybe my data was wrong because what you said is correct and a logic should apply. Assume Flywheel is Level 1. However, I would ignore the dots and can only suggest to use the blankcells as represent the range (?) as that is the constant regardless of level or not.


    There are dynamic blank cells in the Hierarchy column ie.e 1, 2, 3 or whatever. Would not finding the first instance of a blank cell in the Hierarchy column, then to the end of that range until a cell that contains a value...then concatenate that dynamic range with possibly using offset? Just thinking aloud here as I lack the obvious skills that you possess.


    Appreciate your help though KjBox, I really do

    Your solution is perfect KjBox and aligned to what I wanted.


    However, I guess my problem lies with some text having a period ( . ) or not and whether it needs to be joined to the rows above.


    My lists of data are based on hierarchal equipment, a Level 1 would not want to be concatenated with the row(s) above it.


    In version 2.2, rows 24 to 26 are correctly joined using your code, but if there is an equipment name below this (noted as Level 1 in the Hierarchy column). Example, if I add row 27 as a Level 1 equipment name, then it should not be concatenated with rows 24 to 26. I've tried to show this in version 2.3.


    With the current coding it would concatenate to [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 507"]. . ALTERNATOR ASSEMBLY C/W MOUNTING BRACKET ENGINE ASSEMBLY #2[/TD]

    [/tr]


    [/TABLE]

    Instead it needs to be
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 507"]. . ALTERNATOR ASSEMBLY C/W MOUNTING BRACKET [/TD]

    [/tr]


    [tr]


    [td]

    ENGINE ASSEMBLY #2

    [/td]


    [/tr]


    [/TABLE]

    The criteria being the hierarchy column taking precedence, if this make sense?


    I'm probably not explaining myself too well, it confuses me no end at times...my apologies :(

    Wow KjBox, how stunning is that !! Thank you very very much. How does one be able to understand how to do it, let alone create a solution? :)


    I have one slight problem though, if you could advise? Checking through my thousands of rows of data, there are points where the level hierarchy equipment could follow some equipment that start with a " . " (of which you have already concatenated) . In this instance the higher level equipment would be part of that join.


    I've attached a revised document and I have put the hierarchy on another column. I have highlighted the dynamic range it would need to concatenate. I would assume the code could take into account what level it is, then perform the concatenation in between those levels?


    See what you think and I really wouldn't want to put you out because you have been very helpful already.
    Best
    Paul

    Gurus


    In respect of my post for a Power Query solution https://www.ozgrid.com/forum/f…at-are-dynamically-spaced


    If I fail to receive any solution I may have to resort to VBA. However, although I know a bit of VBA this is beyond my skillset.


    I have attached a workbook example with an Equipment List. The names of the equipment in Col A "Equipment Description" can be on 1 row, 2 rows or even more (this is dynamic). Is there a VBA solution to combine whatever cells are required to formulate them into Col B "Concatenated Equipment Description".


    Any solution would be gratefully received.


    Best
    Paul

    Hi All, I'm very very new to Power Query and just love the possibilities with this system. However, I still lack the knowledge to be able to solve my problem.


    I have set up a query to grab and transform a workbook which contains hundreds of Parts List tables. I have successfully transformed the data and loaded it into a worksheet but my problem is the Equipment Description can be on multiple rows, yet I want them to be merged in 1 row.


    The Equipment Description below is my original data. As you can see below; Row 3 " CAT c7 w/ EMC " needs to be merged/joined/concatenated with Row 2 " . ENGINE, DIESEL, 374 HP " to equal " . ENGINE, DIESEL, 374 HP CAT C7 w/ EMC "


    The Concatenated Equipment Description column is what I am trying to achieve, regardless if the Equipment Description is 1 row or split over 2 rows or more...
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 226"]Equipment Description[/TD]
    [TD="width: 356"]Concatenated Equipment Description[/TD]
    [TD="width: 233"]# of dynamic rows to concatenate[/TD]

    [/tr]


    [tr]


    [td]

    ENGINE ASSEMBLY

    [/td]


    [td]

    ENGINE ASSEMBLY

    [/td]


    [td]

    0

    [/td]


    [/tr]


    [tr]


    [td]

    . ENGINE, DIESEL, 374 HP

    [/td]


    [td]

    . ENGINE, DIESEL, 374 HP CAT C7 w/ EMC

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    CAT C7 w/ EMC

    [/td]


    [td][/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    . . ENGINE MOUNTING

    [/td]


    [td]

    . . ENGINE MOUNTING

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    . . ENGINE FRONT

    [/td]


    [td]

    . . ENGINE FRONT ACCESSORIES MOUNTING BRACKET

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    ACCESSORIES

    [/td]


    [td][/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    MOUNTING BRACKET

    [/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    . . ENGINE OIL DIPSTICK

    [/td]


    [td]

    . . ENGINE OIL DIPSTICK AND FILL TUBE

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    AND FILL TUBE

    [/td]


    [td][/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    . . ENGINE OIL FILTER

    [/td]


    [td]

    . . ENGINE OIL FILTER

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    . . ENGINE OIL COOLER

    [/td]


    [td]

    . . ENGINE OIL COOLER

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    . . ENGINE CRANKCASE

    [/td]


    [td]

    . . ENGINE CRANKCASE BREATHER CAP

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    BREATHER CAP

    [/td]


    [td][/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    . . TURBOCHARGER OIL

    [/td]


    [td]

    . . TURBOCHARGER OIL LINES

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    LINES

    [/td]


    [td][/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    . . EXHAUST MANIFOLD

    [/td]


    [td]

    . . EXHAUST MANIFOLD

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    . . ENGINE AIR INLET

    [/td]


    [td]

    . . ENGINE AIR INLET PRE-HEATER

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    PRE-HEATER

    [/td]


    [td][/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    . . VALVE COVER

    [/td]


    [td]

    . . VALVE COVER ASSEMBLY

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    ASSEMBLY

    [/td]


    [td][/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    FLYWHEEL

    [/td]


    [td]

    FLYWHEEL

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    . FLEXPLATE AND

    [/td]


    [td]

    . FLEXPLATE AND FLYWHEEL

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    FLYWHEEL

    [/td]


    [td][/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    . . FAN ASSEMBLY C/W

    [/td]


    [td]

    . . FAN ASSEMBLY C/W BELT

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    BELT

    [/td]


    [td][/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    . . ALTERNATOR

    [/td]


    [td]

    . . ALTERNATOR ASSEMBLY C/W MOUNTING BRACKET

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    ASSEMBLY C/W

    [/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    MOUNTING BRACKET

    [/td]


    [td][/td]


    [td]

    3

    [/td]


    [/tr]


    [/TABLE]

    I have tried multiple If Conditional Columns, I have tried merging columns, transposing columns, grouping (not very successfully) and have spent days and days searching the net to find a solution.


    As I am a basic novice, maybe there is something I'm totally missing but wondered if any gurus here would know how it can be solved?


    More than willing to attach any workbook examples if required?


    Apologies to the moderators if I have failed to comply with any rules regards inserting tables etc.


    Thank you
    Paul

    I'm wracking my brain over this one and I'm sure it is sooooo simple but I have brain freeze.


    I have attached a simple spreadsheet with two projects (Project A and Project B). They show tasks that are mandatory (yes) / not mandatory (no) with a completion status (RAG) ranging from Blue (completed) to other colours (not completed).


    If a task is mandatory then the task is only completed when the RAG status is Blue, otherwise it is not completed if it a.n.other colour is selected. If the task is not mandatory then it needs to be ignored in the calculation.


    Once all mandatory tasks are completed then the result needs to denote this accordingly in the 'All tasks Complete' cell.


    I'm struggling to find a solution with a formula, is there anyone that can advise?


    Best
    Paspuggie48

    I am a basic VBA coder but lost as a bat on this one. I have successfully coded many macros to open IE and navigate through multiple pages, drop-down menus and run reports. However, one I cannot fathom is a sub-menu list option, which is a hover over / mouseover list.


    On the main page is the sub-menu called "Search". When I hover over this Search button with my mouse there is a list of options and in this list is "Modification Register". If I select Modification Register with my mouse, it then navigates to that page. How do I do that with code? I have tried various options in my coding, such as getElementbyID, FireEvent "onchange" but nothing works.


    Here is the HTML code:


    HTML
    <tr>
    <td rowSpan=”1” colSpan=”1”>
                   <div class=”"main menu"” id=”"menuTarget"” style=”"HEIGHT: auto; DISPLAY: block"”>
                                  <ul class=”"mainMenuList"” id=”"navmenu"”>
                                                 <li>
                                                       <a class=”"Selected"” href="”https//website address#”" shape=""””>..</a>
                                                       <ul class="”subMenuList”">
                                                       <li>
                                                             <a class=”"Enabled"” href=”"https//website address#"” shape="">Modification Register</a>
                                                             <img style=”"HEIGHT: 1px; WIDTH: 1px”" alt="" scr="”website address.gif”"></img>


    Unfortunately I cannot provide the website address as it is sensitive information. I appreciate this may cause a barrier or no solution but this is my last option to ask.


    Can anyone suggest how I can do this?


    Paspuggie

    Re: Assign Macro Shapes to email specific files


    I found a small bit of code to determine the Shape name variable on the active shape clicked, then use that variable to find in the range.



    Seems to work :)

    Re: Assign Macro Shapes to email specific files


    Thanks again Carim. I can physically select the cell and run the macro to send an email. That's not a problem, but what I need is for it to happen by clicking the Shape (the Shape has the macro assigned to it).


    Eg if Shape "1" is clicked, it needs to find "1" in the table, attach the document from "C:\Personal\EXCEL\Add Macros to Shapes1.xlsx" and send to "Paul" with "Paul's_email_address.com"


    Eg if Shape "2" is clicked, it needs to find "2" in the table, attach the document from "C:\Personal\EXCEL\Add Macros to Shapes2.xlsx" and send to "David" with "David's_email_address.com"


    etc

    I've had no formal training for VBA, so I'm at my limit of know-how.


    I have multiple shapes, numbered sequentially from a list of integer numbers in a table. The table also contains data of location of filename, name of a person and their email address.


    Attached document is here forum.ozgrid.com/index.php?attachment/73282/


    The code currently assigned to Shape Number "1" is below. (most of my email code is taken from 'rondebruin )



    I don't want to apply a macro to each shape, changing the code to suit (that seems inefficient). So, how do I modify the code so that each shape will automatically know which data to find in the table. Maybe using a index/match formula or find or...I'm not sure ????


    Some advice would be greatly appreciated.
    Cheers

    Dear Gurus


    I have brain freeze today and struggling with a formula. I have a range of start and end dates of each month, which are referenced by a Month number.


    I've attached a simple version of my workbook.


    forum.ozgrid.com/index.php?attachment/72671/


    Col A is the Month No., Col B is the month start date and Col C is the month end date. I've put some examples of what I'm looking for to the right hand side. If someone puts a date in a cell, then I need the adjacent cell to denote what month number it is.


    Would someone have advice which formula to use?


    Cheers
    Paul

    Re: Set print area to cell reference


    I ended up with this...


    Code
    'find the last table and cell used in Col B. Offset to right hand-side to find bottom right of print area
    Set lastCell = Cells(Rows.Count, 2).End(xlUp).Offset(1, 23)
    
    
    'print from cell A1 to that bottom right cell
    ActiveSheet.PageSetup.PrintArea = Range(Cells(1, 1), lastCell).Address


    Again, I'm new to actually trying to write code, so don't know if it is correct coding, but it works for me :)

    Re: Set print area to cell reference


    I tried Carim, but as you know from the previous post the amount of tables is dynamic.


    For 1 table it would be : -


    Code
    ActiveSheet.PageSetup.PrintArea = "$A$1:$Z$26"


    I just don't know enough about coding to adjust it to suit the range, depending on how many tables are inserted...I'm still learning :jumpupdo: