LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default Cannot copy merged cell to a single cell

On 26 Feb., 14:01, Dave Peterson wrote:
FromCell and FromCell2 are always going to be assigned to ranges. *That's what
these two lines do:

* * * * Set FromCell = .Range("c8")
* * * * Set FromCell2 = .Range("G8")


If you want to check to see if the either destcell or destcell2 is empty:

* *if destcell.value = "" _
* * *or destcell2.value = "" then
* * * *'do nothing
* *else
* * * .....

Kasper wrote:

Tried this:


*If FromCell Is Nothing _
* * * * Or FromCell2 Is Nothing Then Exit Sub
* * * * * * 'do nothing
* * * * Else
* * * * * * DestCell.Value = FromCell.Value
* * * * * * DestCell2.Value = FromCell2.Value
* * * * End If.


But this Gives an error: Compile error - ELSE without IF?


--

Dave Peterson


It works as intended.

Thank your for your time and help.

/Kasper
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula from a single cell to a merged cell Rodders Excel Discussion (Misc queries) 4 July 29th 08 06:41 AM
Tabbing from single cell to merged cell sparkle Excel Discussion (Misc queries) 0 May 24th 07 01:56 AM
Very Basic Problem - Merged Cell Equals Contents of a Single Cell jollynicechap Excel Worksheet Functions 3 December 29th 06 08:16 PM
How to copy single cell into cell that is merged from two cells? Rod Excel Discussion (Misc queries) 3 January 22nd 06 09:24 PM
How do I copy data in single cell format to a merged cell format Paul Excel Discussion (Misc queries) 1 June 27th 05 11:00 AM


All times are GMT +1. The time now is 07:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"