![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
I have 2 Sheets ,Sheet("Graph") and Sheet("Main") I used this command but it quite long because it have to go between Graph and Main do you have anyidea to improve this ?
If Range("K16").Value <> "-" then Sheets("Graph").Range("AR5").Copy Sheets("Graph").Cells(i + 1, 44).PasteSpecial End If If Range("K17").Value <> "-" then Sheets("Graph").Range("AR5").Copy Sheets("Graph").Cells(i + 1, 44).PasteSpecial End If If Range("K18").Value <> "-" then Sheets("Graph").Range("AR5").Copy Sheets("Graph").Cells(i + 1, 44).PasteSpecial End If ........ ........ ............. many many Thanks |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Dim oCell As Range
For Each oCell In Range("K16:K25") If oCell.Value <> "-" Then Sheets("Graph").Range("AR5").Copy Sheets("Graph").Cells(i + 1, 44).PasteSpecial End If Next ivan |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks..
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|