ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PasteSpecial Values (https://www.excelbanter.com/excel-programming/435496-pastespecial-values.html)

Ron[_6_]

PasteSpecial Values
 
Hello all,

I'm having a problem with pasting values. I have a sheet that I'm
pasting values to from several other sheets, some columns have
formulas. Some of the formulas use =if(a3 = ""."".do something). I'm
copying and pasting values only of range ("A3:K42) with some of the
rows blank except for the formulas =if(a3 = ""."".do something).

I copy and paste one sheet at a time, but when I paste data from the
next sheet using End(xldown).offset(1,0) to position the cursor in the
right place to paste, it appears that there is actually something in
the cells I pasted as values because the code pastes values well below
the target cell. Does pasting values of a formula return a blank cell
as asked for in the formula using NullNUll or ""?

Thank you for your assistance, Ron




joel[_115_]

PasteSpecial Values
 

If you had somethng like this

-if(A1=1,true,"")

The else condition would show up as something in a cells and the xldown
would see the cell as if there was data in the cell. Sometime if a cell
had data and the data was removed xldown will still thing there was
something in the cell.

I find that is is better to delete an entire row or column rather than
just clear a cell. As a worksheet gets used more and more the size of
the spreadhsett will grow (number of bytes in the file). Removing the
data in the cells will not reduce the file size unless some rows and
columns are deleted. The usedarea willalso grow and not get smaller
when data is removed from the last row(s) and columns(s).

The clearcontents method will completely clear out a cell so xldown
will think the cell is empty, but will not reduce the used area.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=148493



All times are GMT +1. The time now is 03:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com