Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-14-2014, 12:28 PM
gogita_79 gogita_79 is offline need macro insert blank row(s) under data Windows 8 need macro insert blank row(s) under data Office 2013
Novice
need macro insert blank row(s) under data
 
Join Date: Sep 2014
Posts: 11
gogita_79 is on a distinguished road
Default need macro insert blank row(s) under data

I need macro that inserts one or two blank rows under date where will be necessary. for e.x under date must be 2 rows no less no more. as you see under 83570 row is two blank rows, under 83573 one row, under 83575 no one, so I need under date insert 2 rows only. thanks
Attached Images
File Type: png Capture.PNG (50.2 KB, 19 views)
Reply With Quote
  #2  
Old 09-14-2014, 06:59 PM
macropod's Avatar
macropod macropod is offline need macro insert blank row(s) under data Windows 7 64bit need macro insert blank row(s) under data Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You have already been give an answer to a very similar question in this thread: https://www.msofficeforums.com/excel...ific-data.html. Please don't expect to be spoon-fed. Study the code you've already got to see what changes you might need to make for this situation. If you get stuck, then post back explaining what problems you're having.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 09-15-2014, 01:25 AM
gogita_79 gogita_79 is offline need macro insert blank row(s) under data Windows 8 need macro insert blank row(s) under data Office 2013
Novice
need macro insert blank row(s) under data
 
Join Date: Sep 2014
Posts: 11
gogita_79 is on a distinguished road
Default

I think this macro is different, in anyway I am unable to modify macro, I know I have to learn writing macro. simply if you help with this will be glad. thanks
Reply With Quote
  #4  
Old 09-15-2014, 01:53 AM
macropod's Avatar
macropod macropod is offline need macro insert blank row(s) under data Windows 7 64bit need macro insert blank row(s) under data Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Yes, it is different, but not by much. Compare this macro against the one I've posted in the other thread:
Code:
Sub InsertDateRows()
Dim lRow As Long, i As Long
With ThisWorkbook.Worksheets("Sheet1").UsedRange
  For i = .Cells.SpecialCells(xlCellTypeLastCell).Row To 1 Step -1
    If IsDate(.Range("B" & i).Text) Then
       While IsDate(.Range("B" & i + 2).Text) Or IsDate(.Range("B" & i + 1).Text)
          .Range("B" & i + 1).EntireRow.Insert
       Wend
    End If
  Next
End With
End Sub
You'll see that most of the code is the same.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 09-15-2014, 03:36 PM
gogita_79 gogita_79 is offline need macro insert blank row(s) under data Windows 8 need macro insert blank row(s) under data Office 2013
Novice
need macro insert blank row(s) under data
 
Join Date: Sep 2014
Posts: 11
gogita_79 is on a distinguished road
Default

this macro did not work
Reply With Quote
  #6  
Old 09-15-2014, 03:37 PM
gogita_79 gogita_79 is offline need macro insert blank row(s) under data Windows 8 need macro insert blank row(s) under data Office 2013
Novice
need macro insert blank row(s) under data
 
Join Date: Sep 2014
Posts: 11
gogita_79 is on a distinguished road
Default

I tried this macro but nothing did
Reply With Quote
  #7  
Old 09-15-2014, 04:01 PM
macropod's Avatar
macropod macropod is offline need macro insert blank row(s) under data Windows 7 64bit need macro insert blank row(s) under data Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Works for me... What do you actually have in Column B?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 09-15-2014, 10:41 PM
gogita_79 gogita_79 is offline need macro insert blank row(s) under data Windows 8 need macro insert blank row(s) under data Office 2013
Novice
need macro insert blank row(s) under data
 
Join Date: Sep 2014
Posts: 11
gogita_79 is on a distinguished road
Default

what will be if I send you my file and try yourself ?
Reply With Quote
  #9  
Old 09-15-2014, 11:51 PM
macropod's Avatar
macropod macropod is offline need macro insert blank row(s) under data Windows 7 64bit need macro insert blank row(s) under data Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could attach an Excel file to a post, but you haven't even answered the question from my last post.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 09-16-2014, 01:53 AM
gogita_79 gogita_79 is offline need macro insert blank row(s) under data Windows 8 need macro insert blank row(s) under data Office 2013
Novice
need macro insert blank row(s) under data
 
Join Date: Sep 2014
Posts: 11
gogita_79 is on a distinguished road
Default

B column is date sorry
Reply With Quote
  #11  
Old 09-16-2014, 02:15 AM
gogita_79 gogita_79 is offline need macro insert blank row(s) under data Windows 8 need macro insert blank row(s) under data Office 2013
Novice
need macro insert blank row(s) under data
 
Join Date: Sep 2014
Posts: 11
gogita_79 is on a distinguished road
Default here is file

here example file
Attached Files
File Type: xlsx 1.xlsx (15.3 KB, 9 views)
Reply With Quote
  #12  
Old 09-16-2014, 02:46 AM
macropod's Avatar
macropod macropod is offline need macro insert blank row(s) under data Windows 7 64bit need macro insert blank row(s) under data Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There is something odd about your workbook. Although the dates appear to be in column B, the macro can only access them via references to column A. Perhaps that has something to do with the use of a RTL language. To get the macro to work with your workbook, simply change all the "B" references to "A".
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #13  
Old 09-16-2014, 07:15 AM
gogita_79 gogita_79 is offline need macro insert blank row(s) under data Windows 8 need macro insert blank row(s) under data Office 2013
Novice
need macro insert blank row(s) under data
 
Join Date: Sep 2014
Posts: 11
gogita_79 is on a distinguished road
Default

I did all as you told me and it works. thank you very much
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
need macro insert blank row(s) under data need macro insert row under specific data gogita_79 Excel Programming 2 09-15-2014 01:48 AM
Trying to insert a blank which shows up with background highlighted livemusic Word 3 10-29-2012 02:50 PM
How to Insert a Clear, Blank page without Lines and Numbers in a Pleading Document Dirigo Word 5 09-30-2011 08:08 AM
need macro insert blank row(s) under data Sorting or an Excel formula to insert a blank row after ending a series. PRADEEPB270 Excel 1 09-07-2011 02:33 AM
need macro insert blank row(s) under data How to organize and insert blank cells between a huge number of data? tareq Excel 12 09-29-2010 02:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft