Page 1 of 1
need help with excel programming
Posted: Thu Apr 22, 2010 5:16 am
by Phelan
Hi, maybe some of you guys can help me with some VB programming for Excel 2007.
I have a spreadsheet with two worksheets A and B and I need to copy only the visibles cells from the range A1:A100 on worksheet A to a range starting at A10 on worksheet B.
Thanks in advance.
Re: need help with excel programming
Posted: Thu Apr 22, 2010 10:33 am
by Olrane
As far as I know, just select the desired copy range, copy it, and then paste it in the cell that you want to be the most top-left in the new range.
Whether that works or doesn't, let us know.
Note that I have no experience whatsoever with VB, so I may not even understand what you need. I only understand Excel on a basic level. I can help you make graphs!
Re: need help with excel programming
Posted: Fri Apr 23, 2010 3:01 am
by Phelan
I know there is an option that allows you to copy visible cells only, but that works manually. I need some piece of code to insert into my other code that executes several commands when I press a button.
Re: need help with excel programming
Posted: Fri Apr 23, 2010 5:27 am
by Phelan
I managed to solved the problem myself, wasn't that hard.
Code: Select all
Sheets("A").Range("A7:A100").SpecialCells(xlCellTypeVisible).Copy
Sheets("B").Range("A10:A110").PasteSpecial Paste:=xlValues