Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to find blank cell

Hi

I'm hoping to get some help in writing a macro to do the following:

Copy data that is in active cell on active sheet
Go to first empty cell in range D9:D729 of Sheet2
Paste the value only
Drop down one row
Insert one row
End

Any help is greatly appreciated.
Thank

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Macro to find blank cell

Hi Cutter

Sub test()
Dim r As Range, rr As Range
Set rr = ActiveCell
With Sheets("Sheet2")
If Application.CountA(.Range("D2:D729")) = 728 Then
MsgBox "No empty cells"
Else
Set r = _
..Range("D2:D729").SpecialCells(xlCellTypeBlanks). Cells(1)
r.Formula = rr.Value2
r.Offset(1, 0).EntireRow.Insert Shift:=xlDown
End If
End With
End Sub


--
XL2002
Regards

William



"Cutter " wrote in message
...
| Hi
|
| I'm hoping to get some help in writing a macro to do the following:
|
| Copy data that is in active cell on active sheet
| Go to first empty cell in range D9:D729 of Sheet2
| Paste the value only
| Drop down one row
| Insert one row
| End
|
| Any help is greatly appreciated.
| Thanks
|
|
| ---
| Message posted from
http://www.ExcelForum.com/
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to find blank cell

Thank you very much William

--
Message posted from http://www.ExcelForum.com

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
Macro:- Find first blank cell and write text Mac0001UK Excel Worksheet Functions 4 May 17th 09 02:34 AM
Find the first blank row in a cell Chris Anderson Excel Discussion (Misc queries) 6 November 7th 08 04:08 PM
macro to find the last blank cell in col. A peyman Excel Discussion (Misc queries) 16 September 17th 07 11:10 PM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Find and blank cell then Do this..... Bonnie[_5_] Excel Programming 6 November 11th 03 04:35 PM


All times are GMT +1. The time now is 09:44 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"