I have been given a half-done spreadsheet to make into something useable, hopefully someone will be able to help out.
I have a workbook with two sheets - 'Data' and 'Merge Data'
The information in 'Data' is manually input but does have some dynamic data (changing dates to week numbers - but this all works fine). What I need is a something which will copy the complete row from 'Data' to 'Merge Data' if any of the cells from 'Data' L:N are equal to cell B1 in 'Data'.
In Visual Basic there is the following:
Set a = Sheets("Data")
Set b = Sheets("Merge Data")
x = 1
z = 2
Do Until z = 9999
If a.Range("L:N" & z) = "a.Cell(B1)" Then
x = x + 1
'b.Rows(x).Value = a.Rows(z).Value
I don't understand how a range of cells can ever be the same as the value of a single cell.
I could write a code for you which checks every cells in range L1:N9999 and when a cells matches the value of cell B1, copy it's entire row to the next sheet.
But keep in mind that if cell L1, M1 and N1 are all the same value as B1, the same row will be copied three times to the next sheet.
Also keep in mind that checking 30000 cells takes excel some time to "think".