Posts by Mumps


    I have managed to add the values till lightblue colored cell for the first anchor point which is red. The difficulty I am having is adding the values for the other anchor points if they are in a different sheet.

    Please ignore the previous post and try this version:



    1. Sub CutRows()
    2. Application.ScreenUpdating = False
    3. Dim ws As Worksheet, desWS As Worksheet, sh As Range
    4. Set desWS = Sheets("Sheet2")
    5. For Each sh In Sheets("Sheet1").Range("A2", Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp))
    6. Sheets(sh.Value).Rows("2:" & sh.Offset(, 1).Value + 1).Copy desWS.Cells(desWS.Rows.Count, "A").End(xlUp).Offset(1)
    7. Sheets(sh.Value).Rows("2:" & sh.Offset(, 1).Value + 1).Delete
    8. Next sh
    9. Application.ScreenUpdating = True
    10. End Sub

    Are you saying that the code should look only for anchors that are above the light blue colored cells and ignore the anchors below? Since the anchors can be in more than one sheet, will there be light blue colored cells in any of the other sheets?

    i need the addition of floor heights given in inches from first anchor point to the light blue colored single cell

    The first anchor point is in cell E28 (red). This cell is above the light blue cell in column E which is in cell E36. The total for the first anchor is calculated by adding the values in C28:C35. The second anchor is in E40 (green). What range of values in column C would you add to get the total for the second anchor? The third anchor is in E43 (dark blue). What range of values in column C would you add to get the total for the third anchor?

    I think I understand how you got:

    for HWS i need 116.25 + 116.25 +116.25 + 116.25 + 116.25 + 116.25 + 116.25 + 116.25

    They are the values for C28:C35 and that total would be saved in the variable 1hws for the first anchor. Is this correct? How would you calculate the total for 2hws which would be for the second anchor?

    Since the anchor points can be in different sheets, how do you want that to be handled?

    Please attach updated versions of both files. Make sure they include all the user forms and macros including any code that you have added.

    Actually now i want to add the floor heights in column C from 1st anchor to blue colored single cell (That is loop location) in each HWS CHWS HWR and CHWR and store it in variable with same name that is hws chws hwr and chwr

    Also please explain what you want to do as above with an example from your data using specific cell addresses .