Flux rss
Search : in
By : Relevance Date Username
Statut : Not resolved

Excel Macro Held

Kyle L, on Tuesday July 29, 2008 06:15:20 PM
Hello,

If I could get some help with this macro it would be greatly appreciated. I've been working on this project for work for a while. As you can see in my code what i'm trying to do is to work down column "A" checking to see if there is a value in every fourth cell. If there is a value in in each cell then it will copy and paste some coresponding cells in column "B". The problem I am having is that my code will only go through once and then it ends as if there were no more values entered, although there are more entered.

Sub PrintScorecardsClick()

Dim LastLine As Integer, i As Integer
Dim fCell As Range
Dim bCell As Range
Dim hCell As Range


Sheets("Scorecard").Activate

Set fCell = Range("L10:L13")
Set bCell = Range("L27:L30")
Set hCell = Range("L19")


Sheets("List").Activate
LastLine = Cells(Columns("A").Rows.Count, 1).End(xlUp).Row

For i = 1 To LastLine
If Not Range("A" & i).Value = Empty Then

Worksheets("List").Range("B" & i).Copy
ActiveSheet.Paste Destination:=Worksheets("Scorecard").Range("L10")
Worksheets("List").Range("B" & i + 1).Copy
ActiveSheet.Paste Destination:=Worksheets("Scorecard").Range("L11")
Worksheets("List").Range("B" & i + 2).Copy
ActiveSheet.Paste Destination:=Worksheets("Scorecard").Range("L12")
Worksheets("List").Range("B" & i + 3).Copy
ActiveSheet.Paste Destination:=Worksheets("Scorecard").Range("L13")
Worksheets("List").Range("B" & i).Copy
ActiveSheet.Paste Destination:=Worksheets("Scorecard").Range("L27")
Worksheets("List").Range("B" & i + 1).Copy
ActiveSheet.Paste Destination:=Worksheets("Scorecard").Range("L28")
Worksheets("List").Range("B" & i + 2).Copy
ActiveSheet.Paste Destination:=Worksheets("Scorecard").Range("L29")
Worksheets("List").Range("B" & i + 3).Copy
ActiveSheet.Paste Destination:=Worksheets("Scorecard").Range("L30")
Worksheets("List").Range("A" & i).Copy
ActiveSheet.Paste Destination:=Worksheets("scorecard").Range("L19")

Sheets("Scorecard").Activate
fCell.Font.Size = 9
fCell.Font.Name = "Georgia"
bCell.Font.Size = 9
bCell.Font.Name = "Georgia"
hCell.Font.Size = 12
hCell.Font.Name = "Georgia"
Range("L10:L30").Interior.Color = vbWhite
Range("L10:L30").Select
Selection.Borders.LineStyle = xlNone

'ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1

'Range("L10:L13").ClearContents
'Range("L27:L30").ClearContents
'Range("L19").ClearContents
End If
Next i

End Sub
Configuration: Windows Vista
Internet Explorer 7.0
Reply to Kyle L  Report this message to moderators Go to last message

1


  • This message seems useful, vote!
  • Report this message to moderators
 Kyle L, on Friday August 1, 2008 02:56:54 AM
Just want to let anyone know that if they would like the answer to this question it is on another site that I posted on...here is the link
http://www.ozgrid.com/forum/showthread.php?t=98081

Thanks
Reply to Kyle L

Results for

Excel Macro Help Please (Solved) Hello Everyone, I am sking for some help with an Excel macro please. I have a 1,900 hundred static HTML pages that I have converted to text for the purpose of importing to a DB via an Excel CSV file. I have everything sitting in an excel file now with... en.kioskea.net/forum/affich-11146-excel-macro-help-please
Excel Macro for deleting rows IF cells not... Hello, I need help to create a Excel macro. Basicly what I have is a sheet full with information about different departments and what I want to do is delete every row EXCEPT the rows that contain some specified values (wich i would like to enter on... en.kioskea.net/forum/affich-12620-excel-macro-for-deleting-rows-if-cells-not
Excel Macro I need help with an excel macro that will take a username (string) in the first column and look at everytime that they either have an P (present), T (tardy), E (Excused), or A (absent) in a second column. They will be given 400 points if they were... en.kioskea.net/forum/affich-33540-excel-macro

Results for

To insert an image in the FAQTo insert an image in the FAQ Method Where to find images? Inserting screenshots can help to understand an explanation. Here is how to improve tips on Kioskea (FAQ). For this trick, we opted to use the site Imageshack.us. Note:... en.kioskea.net/faq/sujet-67-to-insert-an-image-in-the-faq
How to open/read a .RBS file!How to open/read a .RBS file! RBS is a file extension describing Rebirth files Song files. It is a common error associated with many file extension errors. This method allows skip over programs that are not recognized and continue process. If... en.kioskea.net/faq/sujet-379-how-to-open-read-a-rbs-file

Results for

Excel Macro Help neededI need help with an excel macro that will take a username (string) in the first column and look at everytime that they either have an P (present), T (tardy), E (Excused), or A (absent) in a second column. They will be given 400 points if they were... en.kioskea.net/forum/affich-33099-excel-macro-help-needed
Excel Macro Help pleaseI need help with an excel macro that will take a username (string) in the first column and look at everytime that they either have an P (present), T (tardy), E (Excused), or A (absent) in a second column. They will be given 400 points if they were... en.kioskea.net/forum/affich-33502-excel-macro-help-please
Error In ExcelHello, I recently wrote a fairly complex Excel Macro and have been trying just to work some of the bugs out of it for the past couple weeks. The most recent problems that i've run into is that when it is loaded on to the computer for a while it... en.kioskea.net/forum/affich-20216-error-in-excel

Results for

Spreadsheets - The Excel Interface Microsoft Excel is the spreadsheet in the Microsoft Office office suite. To start it, simply click on the appropriate icon in the Start menu (in Windows) or click on an Excel file (that has an .xls file extension). A Excel document is called a file... en.kioskea.net/tableur/tabinterface.php3
Email - Rules for proper email use Netiquette (a contraction of the words "Net" and "etiquette") refers to the set of rules governing correct behaviour on the Internet, in order to respect others and be respected in turn. They serve as guidelines for civility and proper conduct, so... en.kioskea.net/courrier-electronique/regles-bon-usage-messagerie.php3
Spreadsheets - Cell Selection Spreadsheets are powerful tools for working with data. However, to work with data, it is necessary to have tools to rapidly choose the required cells. An entire line can be chosen by clicking directly on the line header: It is also possible to choose... en.kioskea.net/tableur/tabcellselect-1.php3