If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > If statement with formula inside

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-23-04, 15:41
$mikly_way$ $mikly_way$ is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
Red face If statement with formula inside

I want to use the If statement with a formula to be validated:

Is there a way for me to write the following but in a way that it would actually work?

For i = 1 to 1
If Left ("ActiveCell", 7) = "604-618" Then
EntireRow.Delete

Where "604-618" is a string value

Thank you
Reply With Quote
  #2 (permalink)  
Old 03-24-04, 08:19
DavidCoutts DavidCoutts is offline
Registered User
 
Join Date: Jan 2004
Location: Aberdeen, Scotland
Posts: 1,067
Re: If statement with formula inside

Hi

I think this is what you want

Code:
    If Left(ActiveCell.Formula, 7) = "604-618" Then
        ActiveCell.EntireRow.Delete
    End If
Hope this Helps

David
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On