Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default evaluting cell contents for "type" and add row if the cell is bla

i want to add rows if the contents of a cell in the row is blank. i am using
this macro. i want the macro to go down column c to look for blank cells -
if it encounters a blank cell, i want to insert a row. getting an error
message with the "if statement"

thanks in advance for the help



-- range("c9").Select
Count = 0
Do Until Count = 200
ActiveCell.Offset(1, 0).Select
If ActiveCell.FormulaR1C1 = "=CELL(""type"" = "b")" Then
ActiveCell.EntireRow.Select
Selection.Insert Shift:=xlDown
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Count = Count + 1
Loop


End Sub
aprilshowers
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 510
Default evaluting cell contents for "type" and add row if the cell is bla

Hi April,

What about :

If IsEmpty(ActiveCell.Value) Then

HTH
Carim
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
nested Cell("contents", w/ cell contents reference) JASelep Excel Worksheet Functions 1 October 19th 07 12:17 AM
how to increase size of "name box" and "contents of cell " displa. Stubby- LIBERTY New Users to Excel 2 February 22nd 07 06:43 PM
VBA setting formula for a cell causes "Wrong data type" error undercups Excel Discussion (Misc queries) 4 September 17th 06 10:14 PM
When I type "BVE" in a cell, it automatically chanegs to"BE"..Why ELF Excel Discussion (Misc queries) 1 July 28th 06 07:44 PM
if one cell has "X" textin contents, then pull cell "Y"... azazel Excel Worksheet Functions 3 October 24th 05 05:43 PM


All times are GMT +1. The time now is 05:27 AM.

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

About Us

"It's about Microsoft Excel"