Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Change Macro to Find First Empty Cell

Hello,

Is there a way to change the below code to select the first empty cell in
the row vs. the offset of the last cell entry? I have a workbook with empty
spaces in this column and I would like to fill in those spaces vs. dropping
to the end of the last column entry.

Thanks for your review €“

Roger



Sub FrontPage()

Dim irow As Long
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")

irow = ws.Cells(Rows.Count, 12) _
.End(xlUp).Offset(1, 0).Row

ws.Cells(irow, 12) = ActiveSheet.Range("h5").Value

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default Change Macro to Find First Empty Cell

You could do:

Sub FrontPage()


Dim irow As Long
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")

irow = ws.Cells(1, 12) _
.End(xlDown).Offset(1, 0).Row

ws.Cells(irow, 12) = ActiveSheet.Range("h5").Value

End Sub

hth

Carlo



On Jan 10, 11:59 am, Jenny B.
wrote:
Hello,

Is there a way to change the below code to select the first empty cell in
the row vs. the offset of the last cell entry? I have a workbook with empty
spaces in this column and I would like to fill in those spaces vs. dropping
to the end of the last column entry.

Thanks for your review -

Roger

Sub FrontPage()

Dim irow As Long
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")

irow = ws.Cells(Rows.Count, 12) _
.End(xlUp).Offset(1, 0).Row

ws.Cells(irow, 12) = ActiveSheet.Range("h5").Value

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Change Macro to Find First Empty Cell

you could try:

ws.Columns(12).SpecialCells(xlCellTypeBlanks).Cell s(1) =
ActiveSheet.Range("h5").Value


"Jenny B." wrote:

Hello,

Is there a way to change the below code to select the first empty cell in
the row vs. the offset of the last cell entry? I have a workbook with empty
spaces in this column and I would like to fill in those spaces vs. dropping
to the end of the last column entry.

Thanks for your review €“

Roger



Sub FrontPage()

Dim irow As Long
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")

irow = ws.Cells(Rows.Count, 12) _
.End(xlUp).Offset(1, 0).Row

ws.Cells(irow, 12) = ActiveSheet.Range("h5").Value

End Sub

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Change Macro to Find First Empty Cell

Thank you very much.

Works Great.

"carlo" wrote:

You could do:

Sub FrontPage()


Dim irow As Long
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")

irow = ws.Cells(1, 12) _
.End(xlDown).Offset(1, 0).Row

ws.Cells(irow, 12) = ActiveSheet.Range("h5").Value

End Sub

hth

Carlo



On Jan 10, 11:59 am, Jenny B.
wrote:
Hello,

Is there a way to change the below code to select the first empty cell in
the row vs. the offset of the last cell entry? I have a workbook with empty
spaces in this column and I would like to fill in those spaces vs. dropping
to the end of the last column entry.

Thanks for your review -

Roger

Sub FrontPage()

Dim irow As Long
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")

irow = ws.Cells(Rows.Count, 12) _
.End(xlUp).Offset(1, 0).Row

ws.Cells(irow, 12) = ActiveSheet.Range("h5").Value

End Sub



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
How to: Find first empty cell in column DW Excel Worksheet Functions 18 October 12th 07 05:57 AM
Calc cost pro rata (nested IF's and macro to find empty row) herbwarri0r Excel Worksheet Functions 2 June 19th 07 12:29 PM
find last none empty cell kevcar40 Excel Discussion (Misc queries) 3 March 1st 06 11:59 AM
Find an empty cell and put a dash in it? markexcel Excel Worksheet Functions 5 October 12th 05 03:47 PM
Find a empty cell in next column Michael Excel Discussion (Misc queries) 3 June 15th 05 02:18 PM


All times are GMT +1. The time now is 12:13 PM.

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"