Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can anyone help with the following macro?


Hi all,

Think this should be quite simple for some the guru's here :D

What I have is this

A B C D E
1 X
2 Y Y Y
3 Y Y Y
4 Z
5 M M M

I need the macro to insert a row between A3 and A4 so that the sheet
will look like this when run
A B C D E
1 (blank row)
2 X
3 Y Y Y
4 Y Y Y
5 (blank row)
6 Z
7 M M M

Thanks


--
stanleysi
------------------------------------------------------------------------
stanleysi's Profile: http://www.excelforum.com/member.php...fo&userid=8893
View this thread: http://www.excelforum.com/showthread...hreadid=544969

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Can anyone help with the following macro?

Hi,

you inserted two rows in your example, but need to insert one row?

Depending on what condition?

Regards,
Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can anyone help with the following macro?


Hi,

Just to clarify, yes there should be two rows inserted. What the macr
needs to do is to check the values in the 2nd column and if it is "
(empty) then insert a row ABOVE that.

Hope that clarifies

Thanks

Sta

--
stanleys
-----------------------------------------------------------------------
stanleysi's Profile: http://www.excelforum.com/member.php...nfo&userid=889
View this thread: http://www.excelforum.com/showthread.php?threadid=54496

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Can anyone help with the following macro?

Hi Stan,

Sub InsertRow()
intersect(range("B:B"),activesheet.usedrange).Spec ialCells(xlCellTypeBlanks).entirerow.insert
end sub

Regards,
Ivan

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 recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"