Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Copy contents of a cell into a blank cell

How do I copy the contents of cell B2 into cell D2 only if D2 is empty
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Copy contents of a cell into a blank cell

Hi

It cannot be done with a formula - only with VBA.
The following code should achieve what you described

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$2" Then
If Range("D2") = "" Then Range("D2") = Range("B2").Value
End If
End Sub


To Use
Copy Code above
Right click on sheet tabView Code
Paste code into white pane that appears
Alt+F11 to return to Excel
--
Regards
Roger Govier

"fire9990" wrote in message
...
How do I copy the contents of cell B2 into cell D2 only if D2 is empty

__________ Information from ESET Smart Security, version of virus
signature database 4754 (20100108) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4754 (20100108) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Copy contents of a cell into a blank cell

See replies to your first posting.


Gord Dibben MS Excel MVP

On Fri, 8 Jan 2010 08:41:01 -0800, fire9990
wrote:

How do I copy the contents of cell B2 into cell D2 only if D2 is empty


Reply
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
Copy contents of one cell into another if cell is blank fire9990 Excel Worksheet Functions 2 January 8th 10 04:54 PM
How can I automatically copy cell contents from one cell into anot geeeberry New Users to Excel 2 July 6th 08 10:33 AM
Copy contents to cell based on value in second cell Mike Carpenter Excel Discussion (Misc queries) 3 April 21st 06 03:01 PM
Data entry - Copy contents of cell typed in one cell to another ce danie Excel Worksheet Functions 2 March 16th 06 06:51 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM


All times are GMT +1. The time now is 11:10 PM.

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

About Us

"It's about Microsoft Excel"