PC Review


Reply
Thread Tools Rate Thread

Copy if adjacent Cell has data

 
 
Jeff Gross
Guest
Posts: n/a
 
      27th May 2009
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 With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      27th May 2009
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

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      27th May 2009
if Range("B2").Value <>"" then Range("A2")=Range("B2").Value

"Jeff Gross" <(E-Mail Removed)> wrote in message
news:E73B11C9-0AA9-4C05-B5D2-(E-Mail Removed)...
> 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 With Quote
 
Jeff Gross
Guest
Posts: n/a
 
      27th May 2009
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" <(E-Mail Removed)> wrote in message
> news:E73B11C9-0AA9-4C05-B5D2-(E-Mail Removed)...
> > 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 With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      27th May 2009
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

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      27th May 2009
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" <(E-Mail Removed)> wrote in message
> > news:E73B11C9-0AA9-4C05-B5D2-(E-Mail Removed)...
> > > 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 With Quote
 
Jeff Gross
Guest
Posts: n/a
 
      27th May 2009
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" <(E-Mail Removed)> wrote in message
> > news:E73B11C9-0AA9-4C05-B5D2-(E-Mail Removed)...
> > > 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 With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th May 2009
You also need to FULLY state your question the FIRST time.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Jeff Gross" <(E-Mail Removed)> wrote in message
news:2276638B-CCF1-40D1-8ADF-(E-Mail Removed)...
>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" <(E-Mail Removed)> wrote in message
>> > news:E73B11C9-0AA9-4C05-B5D2-(E-Mail Removed)...
>> > > 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 With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      28th May 2009
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You also need to FULLY state your question the FIRST time.
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "Jeff Gross" <(E-Mail Removed)> wrote in message
> news:2276638B-CCF1-40D1-8ADF-(E-Mail Removed)...
>>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" <(E-Mail Removed)> wrote in message
>>> > news:E73B11C9-0AA9-4C05-B5D2-(E-Mail Removed)...
>>> > > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use data fed in adjacent cells to sort and copy the data to spec named range sri_gs Microsoft Excel Discussion 0 12th Apr 2010 02:07 PM
Re: Making a MsgBox return cell data when search finds different data in an adjacent cell Don Guillett Microsoft Excel Discussion 0 4th Jul 2009 01:37 PM
When data match, copy adjacent value to adjacent column =?Utf-8?B?c2xpbWJpbQ==?= Microsoft Excel Worksheet Functions 2 8th Nov 2006 08:41 PM
Find Cell and Copy adjacent value to another location =?Utf-8?B?SkphbG9tbw==?= Microsoft Excel Programming 1 8th Mar 2005 07:13 PM
non adjacent cell row copy inhibit R3Jar Microsoft Excel Worksheet Functions 1 9th Oct 2003 09:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:21 AM.