|
Answer» Good morning all,
I am learning how to WRITE a SIMPLE Macro program in Excel:
A B C === === === Jame Apple Apple Tom Orange Apple David Apple Apple
------------------------------------------- Here is the code:
Sub testing() For N = 1 to 3 If cells(N,2).value=cells(N,3).value Then Range(corresponding-value).copy Range(corresponding-value).pastespecial End IF Next End Sub ------------------------------------------------------------------------
The program will copy specific ROWS when the cells in colum B equals those in column C, and then it will paste the specific rows of data somewhere in the same worksheet. The program works but it returns empty cells. Here is what the RESULT looks like: ===== Jame Empty cell David =====
Is there any method to skip the empty cells?
Please kindly help if you could!
Kitty
P.S. I am using Excel 2002
|