Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #109675

Re: Insert 5 Row if a Certain Value in Column A Q

From Tvlebung396 <Tblebsng105@gmail.com>
Newsgroups microsoft.public.excel.programming
Subject Re: Insert 5 Row if a Certain Value in Column A Q
Date 2016-11-25 01:03 +0000
Message-ID <Tvlebung396.127d4e08@excelbanter.com> (permalink)
Organization ExcelBanter.com
References <85aeb851-dd87-4609-8e59-8370239ef907@googlegroups.com>

Show all headers | View raw


seanryanie@yahoo.co.uk;1627299 Wrote: 
> I want to insert 5 blank rows, above the first time 10000 appears in
> Column A Then Subtotal Column E &amp; F (from Row 9 down) on the 2nd Row
> of the inserted rows, to finish this line off add a Top border to both
> cells Finally a simple E-F formula on this Row in Column H I've found
> code below, but this inserts a row on each &quot;10000&quot; that
> appears in Column A (there are multiple rows showing 10000, I just want
> the first one) Sub BlankLine() Dim Col As Variant Dim BlankRows As Long
> Dim LastRow As Long Dim R As Long Dim StartRow As Long Col =
> &quot;A&quot; StartRow = 1 BlankRows = 1 LastRow = Cells(Rows.Count,
> Col).End(xlUp).Row Application.ScreenUpdating = False With ActiveSheet
> For R = LastRow To StartRow + 1 Step -1 If .Cells(R, Col) =
> &quot;10000&quot; Then ..Cells(R, Col).EntireRow.Insert Shift:=xlDown
> End If Next R End With Application.ScreenUpdating = True End Sub I'd always want to be update on new posts on this internet site, saved
to bookmarks!




-- 
Tvlebung396

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Insert 5 Row if a Certain Value in Column A Q seanryanie@yahoo.co.uk - 2016-11-24 12:01 -0800
  Re: Insert 5 Row if a Certain Value in Column A Q Tvlebung396 <Tblebsng105@gmail.com> - 2016-11-25 01:03 +0000
  Re: Insert 5 Row if a Certain Value in Column A Q isabelle <i@v.invalid> - 2016-11-25 01:10 -0500
    Re: Insert 5 Row if a Certain Value in Column A Q Claus Busch <claus_busch@t-online.de> - 2016-11-25 07:29 +0100
      Re: Insert 5 Row if a Certain Value in Column A Q seanryanie@yahoo.co.uk - 2016-11-25 12:23 -0800
  Re: Insert 5 Row if a Certain Value in Column A Q aloinam109 <aloinam109@gmail.com> - 2016-11-26 17:03 +0000
  Re: Insert 5 Row if a Certain Value in Column A Q PhunuSEO <PhunuSEO@gmail.com> - 2016-11-27 03:56 +0000
  Re: Insert 5 Row if a Certain Value in Column A Q aloinam109 <aloinam109@gmail.com> - 2016-11-28 03:03 +0000
  Re: Insert 5 Row if a Certain Value in Column A Q aloinam109 <aloinam109@gmail.com> - 2016-11-28 05:03 +0000
  Re: Insert 5 Row if a Certain Value in Column A Q aloinam109 <aloinam109@gmail.com> - 2016-11-28 09:04 +0000
  Re: Insert 5 Row if a Certain Value in Column A Q aloinam109 <aloinam109@gmail.com> - 2016-11-28 16:05 +0000
  Re: Insert 5 Row if a Certain Value in Column A Q anhquan112016 <anhquan112016@gmail.com> - 2016-11-29 01:44 +0000
  Re: Insert 5 Row if a Certain Value in Column A Q Tvlebung396 <Tblebsng105@gmail.com> - 2016-11-29 05:50 +0000

csiph-web