Posts by dangle

    Re: A Macro For Various Data Corrections From List

    I hope the optimism is justified!

    Give this a try:

    Re: Looping copy/paste help. Copying from column 1 to a spreadsheet

    Hi Evan and welcome to the forum

    If you are adding code to the post you should wrap it in code tags to make it easier to read. You can edit your post to sort this.

    Looking at your macro, you haven't set your variables. What are the values of "i", "Rownum" and "Colnum".

    This might help as an alternative, if I've understood your requirements correctly. You can change the range and number of times it repeats to suit.

    Sub Evan1()
    Dim i As Long
    Dim r As Range
    Set r = Range("A1:A20") 'Change the range to suit
    For i = 0 To 15 'Change 15 to set the number of repeats
        r.Offset(i * r.Rows.Count, i + 1).Value = r.Offset(i * r.Rows.Count).Value
    Set r = Nothing
    End Sub

    Re: Macro for iteratively updating a grid based on inputs

    I don't understand how the date fits into your logic.

    This will give the output you require but maybe not for the right reasons.

    Add code to a standard module in Workbook2. Workbook1 saved as Workbook1.xls. Both files should be in the same folder. If it's not right, please provide more info.

    Re: Compare Multiple Coloumns


    I am not quite sure what you are doing since it looks like you could use a simple if formula, but if you want to read the values you could use a variant like:

    Sub CompareValues()
    Dim a, i As Long
    a = Range("A1").CurrentRegion
    For i = 1 To UBound(a, 1)
        'Do something
    End Sub

    Perhaps you could explain more and provide a sample workbook showing what you are trying to achieve.

    Re: vba code to copy down a column & paste in row

    OK. I think this is what you are after:

    Re: Use VBA to open a file with a date in the filename

    Could you perhaps use the DateCreated property of the FileSystemObject, assuming that the filenames correspond with the creation date?

    For example:

    Re: Multiple Rows to Single Column

    Nitin - welcome to the forum.

    This outputs to a new sheet.

    Assuming data starts in A1, try:

    Re: Compare Range from different workbooks and if range match copy and paste.

    Hi Jacwe

    Book1 and Book2 need to be in the same folder. Book2 saved as Book2.xls
    Then add the code to a standard module in Book1 and run.

    Re: vba code to copy down a column & paste in row

    Hi Lior and welcome to the forum.
    Without seeing a sample workbook, this is my guess.
    It will loop through all the worksheets and do the transpose.
    If it's not what you're after then please give more info and provide a sample workbook.

    Re: Macro Find Only Consecutive Duplicates in a Column


    This outputs onto a new sheet. Give it a try and let me know if there are any issues:

    Re: Find keyword and add an item

    Hi Panwar

    I am not sure if you wanted to look for multiple occurences or not so I have allowed for this.


    Re: Copy and overwright rows between workbooks based on a match in a single column

    One quick thought though. Check the worksheet name in the 'With workbooks' line:


    With Workbooks("Spreadsheet B").Sheets(1).Range("A3").CurrentRegion.Resize(, ColCount)


    With Workbooks("Spreadsheet B").Sheets("Sheet1").Range("A3").CurrentRegion.Resize(, ColCount)

    But enter the correct sheet name from Workbook(Spreadsheet B) if it is not 'Sheet1'. I think this may be your issue but will have a further look if not.