Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Copy to first Blank cell in Colum C Non blank cells still exist be

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Copy to first Blank cell in Colum C Non blank cells still exist be

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy to first Blank cell in Colum C Non blank cells still exist be

Range(Selection.Address).End(xlDown).Select

would be

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

--
Regards,
Tom Ogilvy

"Ulrik loves horses" wrote in
message ...
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
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
Remove the blank colum in the graph from merged cells Voltage Charts and Charting in Excel 1 October 27th 09 09:46 AM
Copy cell value into blank cells below (full worksheet) SimmoG Excel Worksheet Functions 4 June 3rd 09 11:03 PM
MACRO - Unmerge cells and delete blank columns, leaving data colum Alex Sander Excel Programming 5 August 8th 06 12:10 PM
find range of non-blank cells in colum DJS Excel Programming 3 June 26th 06 10:27 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 05:52 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"