> I am looking for something that will search col. ,
> then check for a value (like the word "Building") , insert
> a blank row above it.
It works very well thank you I made the following modification so that the
user can enter the column they want on the fly:
*************************************************
Dim I As Integer, x As Integer
Message = "Enter column letter only" ' Set prompt.
Title = "Delete rows of designated cells" ' Set title.
'Default = "1" ' Set default.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)
Select Case MyValue
Case "A", "a"
I = 1
Case "B", "b"
I = 2
Case "C", "c"
I = 3
Case "D", "d"
I = 4
Case "E", "e"
I = 5
Case "F", "f"
I = 6
Case "G", "g"
I = 7
Case "H", "h"
I = 8
End Select
For x = Range(MyValue & "65536").End(xlUp).Row To 1 Step -1
If Cells(x, I).Value = "Building" Then
Cells(x, I).Select
Selection.EntireRow.Insert
End If
Next
**********************************************************
Let me explain to you what I am trying to accomplish and I would appreciate
if you have a better way to do it, to let me know.
Here is a sample of the data in the spread sheet:
********************************************************
Building Primate Clinic CRV($000's) $603 Building Number 504 GSF 2,455
Subsystem Backlog 2008 2009 2010 2011 2012
j.1. Fire Detection Systems $8 $0 $0 $0 $0 $0
l.1. Interior Finishes $0 $0 $0 $0 $0 $32
************************************************************
Here is what the data means:
Building = column lable, Primate Clinic = value, CRV($000's) = column lable,
$603 is the value, Building Number = column lable, 504 = value, GSF = column
lable, 2,455 = value.
Subsystem, Backlog, 2008, 2009, 2010, 2011, 2012 = column lables
the data below them are their values. this pattern repeats in the spread
sheet. not every building will have 2 subsystems, some may have more rows.
Here is what I am trying to accomplish:
I am only interested in "Building" and "Building Number" as lables to be
moved next to the Subsystem, Backlog, 2008, 2009, 2010, 2011, 2012 lables and
then their values moved next to the values of the other lables so that it
should look like this:
*********************************************************
Building Building Number Subsystem Backlog 2008 2009 2010 2011 2012
Primate Clinic 504 j.1. Fire... $8 $0 $0 $0 $0
$0
Primate Clinic 504 l.1. Inte... $0 $0 $0 $0 $0
$32
*********************************************************
the data above is what I want to accomplish eventually, if you have a better
way, I am open. I hope that this is clear and I hope that the format stays
the way I typed it. I really appreciate your help. It will help me a lot to
get this issue
resolved.
thanks again
Al
> You don't say which column so this works for Column A
> Right click the sheet tab, view code and paste this in
[quoted text clipped - 16 lines]
> > then check for a value (like the word "Building") , insert
> > a blank row above it.