Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I have a sheet with four test results on it to review. As I run a new test (on a different sheet) I want the earliest test to fall off the sheet and paste the latest one. Is this possible? Eric |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is the earliest test alway in the same spot (like the top or bottom?) what
are you doing to run the test ie button click etc to let the program know that a new test is ready? -- -John Please rate when your question is answered to help us and others know what is helpful. "Eric" wrote: Hello All, I have a sheet with four test results on it to review. As I run a new test (on a different sheet) I want the earliest test to fall off the sheet and paste the latest one. Is this possible? Eric |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would click a button "post test". The test information is in columns
(three tests to a sheet but all three may not be used). Once I click "post test" the information is transphered to a data sheet where all tests are kept with the latest one on the bottom row. I may have 400 rows of test information but I only want to show the last four on the "last four" sheet. Does this help? Eric "John Bundy" wrote: Is the earliest test alway in the same spot (like the top or bottom?) what are you doing to run the test ie button click etc to let the program know that a new test is ready? -- -John Please rate when your question is answered to help us and others know what is helpful. "Eric" wrote: Hello All, I have a sheet with four test results on it to review. As I run a new test (on a different sheet) I want the earliest test to fall off the sheet and paste the latest one. Is this possible? Eric |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this isn't the most perfect way to do this, but probably the easiest for you
to understand what i'm doing. Change sheet1 to the sheet that has all of the test data (like 400 rows) sheet 2 is the sheet with just the four latest. change the line For i = 4 to 1 step -1 to be what cells you want populated, if you have titles for example you probably want 5 to 2. Sub main() Dim lastRow As Long Dim myRow As Long Dim myCol As Long lastRow = Sheets("sheet1").Cells(Rows.Count, "A").End(xlUp).Row myRow = 1 myCol = 1 For i = 4 To 1 Step -1 Do Until Sheets("sheet1").Cells(lastRow, myCol) = "" Sheets("sheet2").Cells(i, myCol) = Sheets("sheet1").Cells(lastRow, myCol) myCol = myCol + 1 Loop lastRow = lastRow - 1 myCol = 1 Next End Sub -- -John Please rate when your question is answered to help us and others know what is helpful. "Eric" wrote: I would click a button "post test". The test information is in columns (three tests to a sheet but all three may not be used). Once I click "post test" the information is transphered to a data sheet where all tests are kept with the latest one on the bottom row. I may have 400 rows of test information but I only want to show the last four on the "last four" sheet. Does this help? Eric "John Bundy" wrote: Is the earliest test alway in the same spot (like the top or bottom?) what are you doing to run the test ie button click etc to let the program know that a new test is ready? -- -John Please rate when your question is answered to help us and others know what is helpful. "Eric" wrote: Hello All, I have a sheet with four test results on it to review. As I run a new test (on a different sheet) I want the earliest test to fall off the sheet and paste the latest one. Is this possible? Eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
need help w/ macro prompting with info and pasting the info based on user input | Excel Programming | |||
Info pasting into one cell?? | Excel Discussion (Misc queries) | |||
pasting info from workbook to sheet in another workbook | Excel Programming | |||
Adding or pasting a row, but having info shift upwards not down?? | Excel Worksheet Functions | |||
Pasting cells without border info. | Excel Programming |