Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count pending issues prior to 1/15/2009 | Excel Discussion (Misc queries) | |||
I need to show the last number in a rows in the total pending row | New Users to Excel | |||
Conditional Format Pending Text Input | Excel Discussion (Misc queries) | |||
HOW CAN I MAKE OUR PENDING SHIPMENT SHEDULE IN EXCEL? | Excel Discussion (Misc queries) | |||
Pre-pending and post-pending cell data in Excel | Excel Programming |