Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default Pasting info from another sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Pasting info from another sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default Pasting info from another sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Pasting info from another sheet

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help w/ macro prompting with info and pasting the info based on user input drgka55 Excel Programming 8 August 28th 06 06:05 PM
Info pasting into one cell?? Erin Excel Discussion (Misc queries) 2 July 26th 06 06:36 PM
pasting info from workbook to sheet in another workbook s_ali_hassan[_6_] Excel Programming 0 June 15th 06 01:48 PM
Adding or pasting a row, but having info shift upwards not down?? j. martinez Excel Worksheet Functions 1 April 10th 06 08:20 PM
Pasting cells without border info. AW Excel Programming 2 October 24th 04 12:57 PM


All times are GMT +1. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"