Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to: Find first empty cell in column | Excel Worksheet Functions | |||
Calc cost pro rata (nested IF's and macro to find empty row) | Excel Worksheet Functions | |||
find last none empty cell | Excel Discussion (Misc queries) | |||
Find an empty cell and put a dash in it? | Excel Worksheet Functions | |||
Find a empty cell in next column | Excel Discussion (Misc queries) |