PC Review


Reply
Thread Tools Rate Thread

Copy to first Blank cell in Colum C Non blank cells still exist be

 
 
=?Utf-8?B?VWxyaWsgbG92ZXMgaG9yc2Vz?=
Guest
Posts: n/a
 
      8th Oct 2006
Hi

I would like to copy the results of a calculation in a macro into the first
blank cell in column C. Note that this is NOT the cell below the ast row of
the colum.
There are more various blank and non-blanks below the first blank in column C.

How do I select the first blanc cell in Column C then?
The part of the macro below works perfectly except for the fact that it does
not copy the value in the first blanc cell but in the last cell. Adding a
line + 1 did not work until now.

Your help is really appreciated, Many thanks upfront.

If COMPANY = "SA" Or COMPANY = "sa" Then
' Select the SA 2006_2007 sheet for input
Sheets("2006_2007 BE Invoices Out").Select
Range("C1").Select
'Instruction below Brings me to the last non-blank cell, but need the
line below !!!
Range(Selection.Address).End(xlDown).Select

Sheets("Parameters").Select
Range("E16").Select
Selection.Copy
Sheets("2006_2007 BE Invoices Out").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VWxyaWsgbG92ZXMgaG9yc2Vz?=
Guest
Posts: n/a
 
      8th Oct 2006
Suddenly found a solution

If COMPANY = "SA" Or COMPANY = "sa" Then
' Select the SA 2006_2007 sheet for input
Sheets("2006_2007 BE Invoices Out").Select
Range("C1").Select
Range(Selection.Address).End(xlDown).Select
'Moving to the next cell below
ActiveCell.Offset(1, 0).Select

Sheets("Parameters").Select
Range("E16").Select
Selection.Copy
Sheets("2006_2007 BE Invoices Out").Select
Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

"Ulrik loves horses" wrote:

> Hi
>
> I would like to copy the results of a calculation in a macro into the first
> blank cell in column C. Note that this is NOT the cell below the ast row of
> the colum.
> There are more various blank and non-blanks below the first blank in column C.
>
> How do I select the first blanc cell in Column C then?
> The part of the macro below works perfectly except for the fact that it does
> not copy the value in the first blanc cell but in the last cell. Adding a
> line + 1 did not work until now.
>
> Your help is really appreciated, Many thanks upfront.
>
> If COMPANY = "SA" Or COMPANY = "sa" Then
> ' Select the SA 2006_2007 sheet for input
> Sheets("2006_2007 BE Invoices Out").Select
> Range("C1").Select
> 'Instruction below Brings me to the last non-blank cell, but need the
> line below !!!
> Range(Selection.Address).End(xlDown).Select
>
> Sheets("Parameters").Select
> Range("E16").Select
> Selection.Copy
> Sheets("2006_2007 BE Invoices Out").Select
> Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
> SkipBlanks _
> :=False, Transpose:=False
>

 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      8th Oct 2006
Range(Selection.Address).End(xlDown).Select

would be

Range(Selection.Address).End(xlDown)(2).Select
or
Range(Selection.Address).End(xlDown).Offset(1,0).Select

--
Regards,
Tom Ogilvy

"Ulrik loves horses" <(E-Mail Removed)> wrote in
message news:B8239F5B-C890-4AAC-A8E7-(E-Mail Removed)...
> Hi
>
> I would like to copy the results of a calculation in a macro into the
> first
> blank cell in column C. Note that this is NOT the cell below the ast row
> of
> the colum.
> There are more various blank and non-blanks below the first blank in
> column C.
>
> How do I select the first blanc cell in Column C then?
> The part of the macro below works perfectly except for the fact that it
> does
> not copy the value in the first blanc cell but in the last cell. Adding a
> line + 1 did not work until now.
>
> Your help is really appreciated, Many thanks upfront.
>
> If COMPANY = "SA" Or COMPANY = "sa" Then
> ' Select the SA 2006_2007 sheet for input
> Sheets("2006_2007 BE Invoices Out").Select
> Range("C1").Select
> 'Instruction below Brings me to the last non-blank cell, but need the
> line below !!!
> Range(Selection.Address).End(xlDown).Select
>
> Sheets("Parameters").Select
> Range("E16").Select
> Selection.Copy
> Sheets("2006_2007 BE Invoices Out").Select
> Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
> SkipBlanks _
> :=False, Transpose:=False
>



 
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
Copy cell value into blank cells below (full worksheet) SimmoG Microsoft Excel Worksheet Functions 4 3rd Jun 2009 11:03 PM
copy to next blank cell in colum MyKeyJ Microsoft Excel Programming 2 27th Dec 2007 05:21 PM
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... amorrison2006@googlemail.com Microsoft Excel Programming 2 7th Jun 2007 09:27 PM
Need macro to check if cell is not blank & previous cell is blank, copy information from row above & paste JenIT Microsoft Excel Programming 4 12th Apr 2007 08:56 PM
Copy row2 cells down to last cell where the whole row isn't all blank alienscript Microsoft Excel Misc 1 18th Dec 2003 06:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:28 AM.