![]() |
Pending Records
Hi everyone,
I have a little bit of problem with the code for pending records when transferring to a different sheet, which can cause a serious problem. Here is the code: 'Passing Name Sheets("Sheet2").Range("A65000").End(xlUp).Offset( 1, 0).Value = _ Sheets("Form").Range("B3").Value 'Passing Phone # Sheets("Sheet2").Range("B65000").End(xlUp).Offset( 1, 0).Value = _ Sheets("Form").Range("B4").Value I use the same code different Cell in "Form" to pass the data to different Column in "Sheet2". The problem is if Record #1 in "Form" doesn't have Phone # when passing, the corresponded cell in "Sheet2" will be blank too, which is fine. But Record #2 in "Form" that has Phone #, the code pass the Phone # for Record #2 to Record #1 because it finds that the Last blank cell is in Record#1. It doesn't stay with Record #2 . I hope I explain myself for this matter. Is there a way to keep every field to stay with its own record? Appreciate for any help. Neon520 |
Pending Records
Hi
Calculate NewRow from colum A and use it in column B Set sh2 = Sheets("Sheet2") NewRow = sh2.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row 'Passing Name sh2.Range("A" & NewRow).Value = Sheets("Form").Range("B3").Value 'Passing Phone # sh2.Range("B" & NewRow).Value = Sheets("Form").Range("B4").Value Regards, Per "Neon520" skrev i meddelelsen ... Hi everyone, I have a little bit of problem with the code for pending records when transferring to a different sheet, which can cause a serious problem. Here is the code: 'Passing Name Sheets("Sheet2").Range("A65000").End(xlUp).Offset( 1, 0).Value = _ Sheets("Form").Range("B3").Value 'Passing Phone # Sheets("Sheet2").Range("B65000").End(xlUp).Offset( 1, 0).Value = _ Sheets("Form").Range("B4").Value I use the same code different Cell in "Form" to pass the data to different Column in "Sheet2". The problem is if Record #1 in "Form" doesn't have Phone # when passing, the corresponded cell in "Sheet2" will be blank too, which is fine. But Record #2 in "Form" that has Phone #, the code pass the Phone # for Record #2 to Record #1 because it finds that the Last blank cell is in Record#1. It doesn't stay with Record #2 . I hope I explain myself for this matter. Is there a way to keep every field to stay with its own record? Appreciate for any help. Neon520 |
All times are GMT +1. The time now is 10:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com