# Microsoft Office Application Help - Excel Help forum > For Other Platforms(Mac, Google Docs, Mobile OS etc) >  > [SOLVED] MAC - Paste only to visible cells not working

## Lija

hey guys, I've spent last two hours trying to figure out how to paste a selection into visible cells only (some rows are hidden) but no luck. Before I decide to trow my computer out of the window, I want to see if you maybe someone knows what the problem is. Searching the internet did not give any answers.

I want to copy a whole column from one sheet, to another with hidden cells. So what I did is copy as normal, than select where I want to paste, click the visible cells only and then CTRL+V. This does nothing, and I mean nothing. Its like it gets locked when I click the visible cells only option. It doesn't even respond to the paste command. So I don't know what to do. The same happens when I do the right click on the selected cells and then paste. 

Quick note - I use excel 2011 on a mac, so no macros posible  :Frown: 

I added the worksheet as well so you can take a look. I want the paste the values for "average #" from sheet2 to the sheet1 with hidden rows.

Thank you in advance.

----------


## JosephP

you can't do that (in any version of Excel) without code

why can't you use macros if you have Excel 2011?

----------


## Lija

I think someone told me that Mac's version of office doesn't support macros. 
I hope I was wrongly informed  :Smilie:  

p.s. I just read that the 2011 version does support them! And I just installed it today!
So, any ideas?

----------


## JosephP

2008 was the only version that did not support vba-it did still have xml macros

you cannot paste an entire column to only the visible cells in another sheet unless all the rows are visible on that sheet. do you wish to copy and paste only the populated cells or only the cells within the used range of the sheet or a different combination? the code will have to prompt to select the cells for copying as well

----------


## Lija

I wish to copy all the cells from a single column on sheet2 (where all the cells are visible), onto sheet1 that has a couple of rows hidden - and paste it in a way so that it only pastes onto visible cells. 

thx for the help.

----------


## JosephP

you can't copy all the cells-there won't be room on the target sheet

----------


## Lija

the target sheet is bigger than the other one, and the number of hidden rows directly corresponds to the difference in size - so it should fit perfectly.

But now that I have discovered I can use macros, I found one that works!
Sub Copy_Filtered_Cells()
Set from = Selection
Set too = Application.InputBox("Select range to copy selected cells to", Type:=8)
For Each Cell In from
Cell.Copy
For Each thing In too
If thing.EntireRow.RowHeight > 0 Then
thing.PasteSpecial
Set too = thing.Offset(1).Resize(too.Rows.Count)
Exit For
End If
Next
Next
End Sub

----------

