> Every cell that got the original formula will have to change.
>
[quoted text clipped - 31 lines]
>
> Dave Peterson
First, I wouldn't use all of column A:D -- there's 64k rows in xl97-xl2003 and
1MB rows in xl2007.
I'd bet that this would be a lot of formulas that wouldn't be used and would
just add overhead to the workbook.
Option Explicit
Sub testme()
Dim RngToCopy As Range
Dim DestCell As Range
With Worksheets("sheet2")
Set RngToCopy = .Range("a1:D999") ' A:D if you really, really want!
End With
With Worksheets("sheet1")
Set DestCell = .Range("a1")
End With
With RngToCopy
DestCell.Resize(.Rows.Count, .Columns.Count).Formula _
= "=if(" & .Cells(1).Address(rowabsolute:=False, _
columnabsolute:=False, external:=True) & "=""""," & _
"""""," & .Cells(1).Address(rowabsolute:=False, _
columnabsolute:=False, external:=True) &
")"
End With
End Sub
> Is there a quick way to modify all the cells in Columns A:D to work
> this way?
[quoted text clipped - 34 lines]
> >
> > Dave Peterson

Signature
Dave Peterson
dzelnio - 15 Jun 2007 19:34 GMT
Forgive my rookie-ness. Is this a macro? How do I use it?
Dave
> First, I wouldn't use all of column A:D -- there's 64k rows in xl97-xl2003 and
> 1MB rows in xl2007.
[quoted text clipped - 70 lines]
>
> Dave Peterson
Dave Peterson - 15 Jun 2007 20:50 GMT
Yep, it's a macro.
You may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
If you want to do it manually...
Select the range to receive the formulas (say A1:D999)
With A1 the activecell, type this formula:
=if('sheet2'!a1="","",'sheet2'!a1)
(adjust the sheetname to match your requirements)
But instead of hitting enter, hit ctrl-enter to fill the selection with that
formula (excel will adjust it for the other cells).
> Forgive my rookie-ness. Is this a macro? How do I use it?
>
[quoted text clipped - 74 lines]
> >
> > Dave Peterson

Signature
Dave Peterson
dzelnio - 15 Jun 2007 22:15 GMT
I did it manually. It was touchy, but I got it to work.
Thanks so much!
Dave
> Yep, it's a macro.
>
[quoted text clipped - 95 lines]
>
> Dave Peterson