PC Review


Reply
Thread Tools Rate Thread

Can somebody help me convert this logic into running code please?

 
 
shhhhh
Guest
Posts: n/a
 
      18th Jan 2007
Basic idea is I have a file with mutiple sheets. Sheet 4 is a listing of dates with information.
Every approximately 13-15 rows there is a header "date" in column a. Once I see that "date" I want to copy everything below it until the next "date" shows up to the another sheet, then the next sheet, then the sheet after that, etc... In the row just above the "date" in column B there is a unique number, starting at 1 that I figured I could use as the sheet identifier, unless it's just as easy to count over sheets where the data goes to. The other thing is I need the copied rows to always start as row 2 on the new sheet.

Sorry if I'm not too clear on my needs the head cold has a good hold on my thoughts right now. Hopefully the below will help clarify.

Thanks in advance for any assistance anybody can provide.

Row Copy Subroutine

On Sheet 4
while cell (r,"a") not "eof"
if cell (r,"a") = "Date" then
rmark=r
r=r+1
if cell (r,"a") = "Date" then
rmark2=r
totalrowstocopy=rmark2-rmark
rmarkcount=rmark
rowcounter=1
do while rmarkcount < rmark2
rowcounter=rowcounter+1
copy entire row(rmarkcount+1) to sheet(sheetname(r-1,"b")).row(1+rowcounter)
rmarkcount = rmarkcount + 1
wend
else
r=r+1
endif
r=r+1
endif
wend



--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add additional logic to my code Little Penny Microsoft Excel Programming 5 5th Dec 2007 01:14 AM
how to convert logic operation stored as a string to bool ? Jakub Bednarczuk Microsoft C# .NET 2 11th Jan 2007 09:09 PM
Logic and Loop Code oscarooko Microsoft Excel Programming 1 19th Oct 2005 04:23 PM
Report/Code Logic =?Utf-8?B?QW5uTWFyaWU=?= Microsoft Access Reports 0 8th Jun 2005 08:15 PM
Display message for long running server logic =?Utf-8?B?R0I=?= Microsoft ASP .NET 5 5th Feb 2004 10:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:19 PM.