Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Copy if adjacent Cell has data

I need to copy text into a cell "A2" if there is any data in "B2". B2
contains a formula but will appear blank if its source has nothing.

Any ideas?

Jeff
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Copy if adjacent Cell has data

In Cell A2

=B2

If this post helps click Yes
---------------
Jacob Skaria


"Jeff Gross" wrote:

I need to copy text into a cell "A2" if there is any data in "B2". B2
contains a formula but will appear blank if its source has nothing.

Any ideas?

Jeff

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Copy if adjacent Cell has data

if Range("B2").Value <"" then Range("A2")=Range("B2").Value

"Jeff Gross" wrote in message
...
I need to copy text into a cell "A2" if there is any data in "B2". B2
contains a formula but will appear blank if its source has nothing.

Any ideas?

Jeff


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Copy if adjacent Cell has data

Sorry but I didn't make myself clear. I am copying from a different
worksheet into A2 if there is any data in B2.

Jeff.

"Patrick Molloy" wrote:

if Range("B2").Value <"" then Range("A2")=Range("B2").Value

"Jeff Gross" wrote in message
...
I need to copy text into a cell "A2" if there is any data in "B2". B2
contains a formula but will appear blank if its source has nothing.

Any ideas?

Jeff



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Copy if adjacent Cell has data

OR may be

Range("A2").value=Range("b2").value

--
If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

In Cell A2

=B2

If this post helps click Yes
---------------
Jacob Skaria


"Jeff Gross" wrote:

I need to copy text into a cell "A2" if there is any data in "B2". B2
contains a formula but will appear blank if its source has nothing.

Any ideas?

Jeff



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Copy if adjacent Cell has data

Add extension if the workbook is saved....

Workbooks("book1").Sheets("Sheet1").Range("A2") =
Workbooks("book2").Sheets("Sheet1").Range("B2")

If this post helps click Yes
---------------
Jacob Skaria


"Jeff Gross" wrote:

Sorry but I didn't make myself clear. I am copying from a different
worksheet into A2 if there is any data in B2.

Jeff.

"Patrick Molloy" wrote:

if Range("B2").Value <"" then Range("A2")=Range("B2").Value

"Jeff Gross" wrote in message
...
I need to copy text into a cell "A2" if there is any data in "B2". B2
contains a formula but will appear blank if its source has nothing.

Any ideas?

Jeff



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Copy if adjacent Cell has data

I also need this code to cycle through all cells down to row 300.

"Jeff Gross" wrote:

Sorry but I didn't make myself clear. I am copying from a different
worksheet into A2 if there is any data in B2.

Jeff.

"Patrick Molloy" wrote:

if Range("B2").Value <"" then Range("A2")=Range("B2").Value

"Jeff Gross" wrote in message
...
I need to copy text into a cell "A2" if there is any data in "B2". B2
contains a formula but will appear blank if its source has nothing.

Any ideas?

Jeff



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Copy if adjacent Cell has data

the following copies a range from one worksheet to another. it copies empy
cells, but does that make any difference?

worksheets("sheet2").Range("B1:B300").Value =
worksheets("sheet1").Range("B1:B300").Value



"Don Guillett" wrote in message
...
You also need to FULLY state your question the FIRST time.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jeff Gross" wrote in message
...
I also need this code to cycle through all cells down to row 300.

"Jeff Gross" wrote:

Sorry but I didn't make myself clear. I am copying from a different
worksheet into A2 if there is any data in B2.

Jeff.

"Patrick Molloy" wrote:

if Range("B2").Value <"" then Range("A2")=Range("B2").Value

"Jeff Gross" wrote in message
...
I need to copy text into a cell "A2" if there is any data in "B2".
B2
contains a formula but will appear blank if its source has nothing.

Any ideas?

Jeff



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
compare two text and if equal copy adjacent data Prashanthom Excel Worksheet Functions 1 December 29th 06 03:03 AM
conditional formatting Copy colour of adjacent cell DDawson Excel Programming 8 November 27th 06 05:04 PM
When data match, copy adjacent value to adjacent column slimbim Excel Worksheet Functions 2 November 8th 06 08:41 PM
Find Cell and Copy adjacent value to another location JJalomo Excel Programming 2 March 8th 05 07:17 PM
Copy/paste based on adjacent cell contents Ozbobeee Excel Programming 3 August 9th 03 06:57 AM


All times are GMT +1. The time now is 02:39 AM.

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"