
Originally Posted by
anuj_sethi1043
can u place two buttons on file
Yes, but you don't indicate what this second button does...
and i want the D row to be copied to next file copied one after leaving 2 columns
ex D copied to other file in (column 6 ,nxt time to get pasted in column 9)
On the COPIED DATA.XLS sheet, change the formula in B12 to this to get that behavior:
=MATCH(LOOKUP(9.99999999999999E+307,2:2),2:2,0)+3
in nirulas file only at end the row 138 cells (b,c,d,e,f,G,h) to be copied on click of a button to another file called fill rate with date on top
Ok, here's the macro:
Sub AutoFillRate()
Dim NextRow As Long
'Check if destination workbook is open already, open it if necessary
On Error Resume Next
Workbooks("fill rate.xlsx").Activate
If Err <> 0 Then Workbooks.Open "fill rate.xlsx"
'Copy data
NextRow = Range("B" & Rows.Count).End(xlUp).Row + 1
Cells(NextRow, "A").Value = Workbooks("nirulas vikas puri.xls").Sheets("Sheet1").Range("B132").Value
Cells(NextRow, "B").Value = Workbooks("nirulas vikas puri.xls").Sheets("Sheet1").Range("D132").Value
Cells(NextRow, "C").Value = Workbooks("nirulas vikas puri.xls").Sheets("Sheet1").Range("E132").Value
Cells(NextRow, "E").Value = Workbooks("nirulas vikas puri.xls").Sheets("Sheet1").Range("F132").Value
End Sub
Add that to your sheet and add a Forms Button to attach it to.
Bookmarks