473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Logic statement help

16
Sorry for the bother again, I've been continuing improving what I made, and was just now trying to make a if then statement work by putting it before this. Such as If Ash.columns("e")> ash.columns("F)" Then (the following will occur. I'm not even sure if this is possible. But Thanks for even taking the time to read this.



Expand|Select|Wrap|Line Numbers
  1.  
  2.     For Each cell In Ash.Columns("b").Cells.SpecialCells(xlCellTypeConstants)
  3.         If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0, 2).Value) = "yes" Then
  4.         'Use this to set range of Cells, as in what columns to put in
Jun 16 '10 #1

✓ answered by MMcCarthy

I'm not really sure what you are asking but you can nest any series of statements.

Expand|Select|Wrap|Line Numbers
  1. If <Statement> Then
  2.     For i=1 to 100
  3.         If <Statement> Then
  4.             Do this
  5.         Else
  6.             Do this
  7.         End If
  8.     Next i
  9. Else
  10.     Anything you want
  11. End If

1 1006
MMcCarthy
14,534 Expert Mod 8TB
I'm not really sure what you are asking but you can nest any series of statements.

Expand|Select|Wrap|Line Numbers
  1. If <Statement> Then
  2.     For i=1 to 100
  3.         If <Statement> Then
  4.             Do this
  5.         Else
  6.             Do this
  7.         End If
  8.     Next i
  9. Else
  10.     Anything you want
  11. End If
Jun 16 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Little PussyCat | last post by:
Hello, I hope you can help me. We have a SQL Server 2000 database at work, (which works with a VB6 frontend) which grew to a considerable size, so one of my past colleagues sent me this...
9
by: Peter | last post by:
My problem is the last bit of coding below, the like statement does not work. what I have is a product options field and in it is stored characters i.e. "avcy" etc what the query does is...
11
by: Scott C. Reynolds | last post by:
In VB6 you could do a SELECT CASE that would evaluate each case for truth and execute those statements, such as: SELECT CASE True case x > y: dosomestuff() case x = 5: dosomestuff() case y >...
2
by: NathanV | last post by:
I need some help with a SQL statement (SQL Server 2k). I have three tables, an Artists table which holds user info, a Types table which holds the TypeID and Description for different types (I.e....
24
by: Mark | last post by:
Hi - how can I get a switch statement to look for a range of values? I have: function payCalc(field, field2) switch(field.value) { case 0-50: field2.value="lower band"; case 51-99:...
3
by: samearle | last post by:
Help me write this for MS access, I'm used to Oracle - SELECT Users.*, group_1, group_2, group_3 from (select UserInGroup.UserID, max(decode(GroupID, 1, GroupID, null)) as group_1,
2
by: UofFprogrammer | last post by:
I am trying to create a program that will accept either a character or integer value and then use it in a logic statement. However, when I run this sample program, if i put 1 in for choice, it will...
9
by: SAL | last post by:
Hello, I have a Dataset that I have table adapters in I designed using the designer (DataLayer). I have a business logic layer that immulates the DataLayer which may/may not have additional logic...
0
by: feeblemind | last post by:
Hi everyone, I am having problem/troubles with creating an sql inline statement for our application. How do I create a statement/query that selects list of servers with defined date ranges, but...
3
by: erik6408 | last post by:
I am trying to use the IIF statement to look for a null value. That seems to be working fine.. The problem occurs when I use a LIKE Statement inside the IIF statement. Here are some examples:...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.