Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

How do I insert blank cells with VBA?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Face - 26 Nov 2007 16:55 GMT
I run a comparison between column A and column H. Sometimes column A has the
same number, with different data in column B. I need to insert and move down
6 cells beginning in column H. Is there a function or VBA code that can
handle this operation.
dan dungan - 26 Nov 2007 17:34 GMT
I'm not quite clear on your request:

> I run a comparison between column A and column H.
1. How do you run the comparison?

>I need to insert and move down 6 cells beginning in column H.
2a. What do you want to insert? Data? Rows? Cells?
2b. I don't understand "beginning in column H".

> I run a comparison between column A and column H. Sometimes column A has the
> same number, with different data in column B. I need to insert and move down
> 6 cells beginning in column H. Is there a function or VBA code that can
> handle this operation.
Face - 26 Nov 2007 17:57 GMT
Sorry, I import or link data into a single spreadsheet. The data should be
identical from both sources, but .... due to errors, I/we have to run
analysis on both sets of data to confirm no errors.
In columns A thru F is data from one source and columns H thru M is data
from the second source. Columns A and H are flight/mission numbers.
Periodically, adjustments occur to the first source (in column A), but when
the adjustments are made they are typically made as 2 separate entries,
reusing the flight/mission number. The data from my second source will not
allow duplication of the flight/mission numbers, so the entry is adjusted
then re-entered.
We import or link the data from the 2 sources and I need to be able to keep
the flight/mission numbers lined up, by adding space (horizontally).

> I'm not quite clear on your request:
>
[quoted text clipped - 9 lines]
> > 6 cells beginning in column H. Is there a function or VBA code that can
> > handle this operation.
Face - 26 Nov 2007 22:20 GMT
Found the code:
Used as a macro, place the cursor in the row you want to insert blank cells,
the Range is the columns to insert blank cells.

Sub InsertCells()
' InsertCells Macro
' Keyboard Shortcut: Ctrl+Shift+C
'
   Cells(ActiveCell.Row, 1).Range("H1:M1").Select
   Selection.Insert Shift:=xlDown
End Sub

> Sorry, I import or link data into a single spreadsheet. The data should be
> identical from both sources, but .... due to errors, I/we have to run
[quoted text clipped - 22 lines]
> > > 6 cells beginning in column H. Is there a function or VBA code that can
> > > handle this operation.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.