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

  • Thread starter Ulrik loves horses
  • Start date
U

Ulrik loves horses

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
 
U

Ulrik loves horses

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
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top