ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   copying (https://www.excelbanter.com/excel-worksheet-functions/199587-copying.html)

scott

copying
 
i have data in a1:a31 and in a45 i am putting =a1. i then click the black
box at the bottom of a45 and drag until each successive cell contains the
information from a1:a31. some of the cells in the range a1:a31 are empty,
and when i copy the cells from a45:75, those corresponding cells have a 0 in
them. what IF statement do i need to add to a45 that keeps the same
formatting (?) or keeps the blank cell instead of adding the 0?

thanks!

Duke Carey

copying
 
You have a couple of choices: You can go into Tools-Options and tell Excel
to not display zero values, or you can wrap your =CellAddress formula in an
IF() to evaluate to an empty string"" if the referenced cell is empty.
Depends on your preferences.

The formula would be:

=IF(ISBLANK(A1),"",A1)

"scott" wrote:

i have data in a1:a31 and in a45 i am putting =a1. i then click the black
box at the bottom of a45 and drag until each successive cell contains the
information from a1:a31. some of the cells in the range a1:a31 are empty,
and when i copy the cells from a45:75, those corresponding cells have a 0 in
them. what IF statement do i need to add to a45 that keeps the same
formatting (?) or keeps the blank cell instead of adding the 0?

thanks!


David Biddulph[_2_]

copying
 
=IF(A1="","",A1)
--
David Biddulph

"scott" wrote in message
...
i have data in a1:a31 and in a45 i am putting =a1. i then click the black
box at the bottom of a45 and drag until each successive cell contains the
information from a1:a31. some of the cells in the range a1:a31 are empty,
and when i copy the cells from a45:75, those corresponding cells have a 0
in
them. what IF statement do i need to add to a45 that keeps the same
formatting (?) or keeps the blank cell instead of adding the 0?

thanks!





All times are GMT +1. The time now is 12:59 PM.

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