Posts by rsaha

    Well I was able to come up with answer, for those who might find it useful, here is my solution:

    here is my first attempt at creating a code for my problem:

    however i keep getting the following error message:

    [ATTACH=JSON]{"data-align":"none","data-size":"full","title":"vba error.PNG","data-attachmentid":1196872}[/ATTACH]

    I also feel like the copy and paste portion of the code wont work either, but havent been able to get to that section yet. i would like to be able to loop through data and paste each hi after one another or each lo after each other in their respective sections.

    I look forward to any and all solutions.

    Hello all.

    i have a set of data in grid form. The data provides me with hi, lo and a date for each hi and lo. in cell h1 i have a specific date. I would like to create a macro that goes through the grid and and if the hi/lo date matches the date in cell h1, it would take the data and place it in a separate section, hi data in section 'p-s' and lo data in section 'u-x'. I have attached a spreadsheet to serve as template as to what i am looking for. Thanks for all your help.

    Re: Loop through a range of data and delete the top row and then copy to another shee

    thanks bryce, i ran the file with new changes, however it errors out when there is only one line left and enter debug mode. it highlights the following line:

    wsHistory.Range("B" & wsHistory.Range("B" & Rows.Count).End(xlUp).Offset(1).Row) = Application.WorksheetFunction.Correl(wsData.Range("B5:B15"), wsData.Range("C5:C15"))

    I have set a data on which i am running historical regression and correlation analysis on. I would like to create a macro that would copy my results to another worksheet, then delete the top row of data, run the analysis over again for the remaining data and repeat. i have attached a spreadsheet to help clarify what i am trying to do.

    The data tab contains the data and analysis i am performing. In this case, I would like to copy cell b1 to worksheet "historical analysis" where it would be placed in column B, next to its corresponding date, e.g. cell B5. Then i would go ahead and delete the data in worksheet "data", row "5", with everything moving up one row, and the copy the analysis from B1 and paste in worksheet "historical analysis", cell "B6", so on and so forth.

    The file i have provided is a small microcosm of what i am trying to do. Here is what i was able to come up with, though it doesnt work:

    Re: Loop through worksheets and copy last row down one row

    Actually the code works even with gaps. i made a couple of changes and everything seems to work expect one line of code that i added. I am trying select the first cell in the new range that i copied down, however i am getting an error message. here is the code that i am using:

    this is the line that is erroring out:

    .Range(.Cells(lBR + 1, lLC), .Cells(lBR + 1, lLC)).Select

    I appreciate the help.

    Re: Loop through worksheets and copy last row down one row

    I got this code to work with worksheets that are uniform, ie start in the same cell (A1). I am now looking for way to make it more flexible.

    Hello everyone. I have a workbook with 3 worksheets, i would like a macro what would loop each worksheet, find the last row with formulas and copy it down to the next row. Unfortunately, the three tabs are not uniform. I have attached a spreadsheet example to better clarify what i am trying to do. I have highlighted the row where i would like to the formulas copied to. I was using the following code, which worked great for just one worksheet, but wasnt dynamic or flexible enough when i wanted to loop through several worksheets with data in different locations:

    I appreciate any and all help.

    I am currently working on a project that associates 6 cycle weeks with a particular rate month, e.g. cycles 1-6 correspond to jan-17 rate month, cylces 7-12 correspond to feb-17 rate month, etc. There are a total of 72 cycles per year that are associated with 12 months per year. Currently i have manually associated each rate month with its respective cycle week. I was looking for a way to use a formula that would make it more dynamic.

    I have attached a spreadsheet with the data that i am working with. I am looking for the formula to be place in column B. I also have a section that associates the rate month and the last cycle in each rate month in columns D & E.

    Thank you for all your help.

    Re: Creating Charts using a list box

    I am sorry for the confusion. I am looking to for single list that allows multi-select, hence why iw as asking for a help with a list box, which allows you to do so.

    I agree with you that i dont need 144 drop down boxes. My point was with the method you suggested would require me to have 144 drop boxes, which isnt feasible.