View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Macro - How do i....?

Here is a simply methods which I added the delete for column f

LastRow_C = Range("C" & Rows.Count).End(xlUp).Row
Row_C_Count = LastRow_C + 1
LastRow_F = Range("F" & Rows.Count).End(xlUp).Row
Range("F1:F" & LastRow_F).Copy
Range("C" & Row_C_Count).PasteSpecial _
SkipBlanks:=True
columns("F").delete

"Malissa" wrote:

Joel,

I tried it and it worked on that worksheet... one more question, what do I
need to do to delete the info from column F after it is moved to column C?

Thanks,
--
Malissa


"Joel" wrote:

I start check column F at Row 1. this may need to be changed.

LastRow_C = Range("C" & Rows.Count).End(xlUp).Row
Row_C_Count = LastRow_C + 1
LastRow_F = Range("F" & Rows.Count).End(xlUp).Row
For F_RowCount = 1 To LastRow_F
If Range("F" & F_RowCount) < "" Then
Range("C" & Row_C_Count) = Range("F" & F_RowCount)
Row_C_Count = Row_C_Count + 1
End If
Next F_RowCount

"Malissa" wrote:

I have a worksheet that starts out like this with 5 columns:

A B C D
E
1000 0 14630.17 Bank of Amer Disbursement Account
2200 0 250.64 401K Pension Due
6220 5192.31 0 Staff Veterinary Salaries 0
6223 1179.74 0 Veterinary Assistant Wages 157.81
6224 908.5 0 Receptionist Wages 79
6225 4843.19 0 Veterinary Technician Wages 410.98
6227 1346.15 0 Practice Manager Wages 0
6245 262 0 Grooming Payroll Expenses 0
6290 1380 0 Payroll Taxes
6290 0 3525.19 Payroll Taxes-ee
6290 3525.19 0 Payroll Taxes-ee
6315 0 14.4 Disability Insurance
6330 0 342 Medical/Dental Insurance
6355 125.32 0 Retirement Plan Contributions

The first part of the marco I have created creates a new column before A and
takes the amount in row 1column C and pastes it to all rows that hold
information then deletes first row.
Looks like this:

A B C D E
F
14630.17 2200 0 250.64 401K Pension Due
14630.17 6220 5192.31 0 Staff Veterinary Salaries 0
14630.17 6223 1179.74 0 Veterinary Asst Wage 157.81
14630.17 6224 908.5 0 Receptionist Wages 79
14630.17 6225 4843.19 0 Veterinary TechWages 410.98
14630.17 6227 1346.15 0 Practice Manager Wages 0
14630.17 6245 262 0 Grooming Payroll Expenses 0
14630.17 6290 1380 0 Payroll Taxes
14630.17 6290 0 3525.19 Payroll Taxes-ee
14630.17 6290 3525.19 0 Payroll Taxes-ee
14630.17 6315 0 14.4 Disability Insurance
14630.17 6330 0 342 Medical/Dental Insurance
14630.17 6355 125.32 0 Retirement Plan Contributions

The next part I am unsure of. What I need to do is take the amounts in
column F and move them to the bottom of column C. I also need to eliminate
spaces. The catch is that this document may never be exactly the same so it
cannot be cell specific.

Any suggestions are greatly appreciated. This is my first time working with
macros. If you need more info please let me know.



Thanks,
--
Malissa