Multiple If Statement
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Multiple If Statement

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    England
    Posts
    212
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I'm trying to copy data from one cell to another if 2 conditions are satisfied but not having much fun at the moment. I guess you can see from the code underneath what I'm trying to achieve, if J4 is blank and A4 equals March, then copy cell A2 from sheet 4 to the J4 in the current sheet.

    Range("J4").Select
    If j4 = "" Then
    If a4 = "March" Then
    ActiveCell.formula = "=sheet4!A2"
    End If
    End If

    Any suggestions?

    Thanks

    Matt

  2. #2
    MrExcel MVP Barrie Davidson's Avatar
    Join Date
    Feb 2002
    Location
    Winnipeg
    Posts
    2,330
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try this


    If Range("J4").Value = "" And _
    Range("A4").Value = "March" Then
    Range("J4").Formula = "=Sheet4!A2"
    End If


    Regards,
    Barrie Davidson

    "You're only given a little spark of madness. You mustn't lose it." - Robin Williams

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    England
    Posts
    212
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Thanks Barrie

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com