View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default multiple if then statements

You need to replace the & with the word AND. & is used when you are putting
strings together "AND" is when you are putting conitional statement like A =
1 AN D B = 2.

"Joseph Weber" wrote:

In my spreadsheet i named fields "company" "ncompany" and they are one down
from each other. I have a number of fields i am trying to test but got an
error. this is the macro so far. if anyone could help please let me know.

If Range("EXPENSET") = Range("NEXPENSET") & Range("RECDATE") =
Range("NRECDATE") & Range("AMT") = Range("NAMT") & Range("EXPENST") <
"TOLLS/BRIDGES" & Range("DATESUBMIT") < Range("NDATESUBMIT") Then
Range("EXPENSET").Select
ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
Selection.copy
Application.Goto REFERENCE:="FIRSTCHECK"
ActiveSheet.Paste