+ Reply to Thread
Results 1 to 3 of 3

IF OR statement column correspondence issue

  1. #1
    Registered User
    Join Date
    08-13-2019
    Location
    US
    MS-Off Ver
    360
    Posts
    5

    IF OR statement column correspondence issue

    Hello, having trouble finding out how to say if a value in E is greater than or equal to 30 or less than or equal to 50, then take the average of the corresponding values in column H
    I started with this as a formula

    =IF(OR(E:E>=30,E:E<=50),AVERAGE(H:H).

    I tried doing a macro to just list what cells were being used

    Sub CyclicDisplacement()
    Dim cycle As Range

    Set cycle = Range("E:E")
    If cycle >= 2 Or cycle <= 10 Then
    MsgBox cycle.Address
    End If
    End Sub

    however I ran into the error "type mismatch", and if I tried "cycle.Value", same error.

    Can someone please help me designate it correctly so that I can match the corresponding E values to H values and then average the H values?

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: IF OR statement column correspondence issue

    No OR involved if I'm following correctly.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    edit:- Please read the forum rules regarding thread titles and code tags. https://www.excelforum.com/forum-rul...rum-rules.html

  3. #3
    Registered User
    Join Date
    08-13-2019
    Location
    US
    MS-Off Ver
    360
    Posts
    5

    Re: IF OR statement column correspondence issue

    Jason, you're right. Thanks for the help, wasn't familiar with that formula!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Vlookup - Return 2nd or 3th or other pre-defined correspondence
    By beto77 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-14-2015, 07:10 PM
  2. correspondence cell value contained in table
    By lontra78 in forum Excel General
    Replies: 1
    Last Post: 08-27-2014, 07:14 AM
  3. checck and display the correspondence output
    By gurum in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2013, 08:00 AM
  4. Return top 3 values and their correspondence
    By RandomP in forum Excel General
    Replies: 4
    Last Post: 11-11-2011, 11:13 AM
  5. Looking for a correspondence in VBA
    By seoer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2011, 07:51 AM
  6. How to find max value with correspondence text
    By nasg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2010, 05:55 AM
  7. Tracking correspondence
    By rhone81 in forum Excel General
    Replies: 0
    Last Post: 05-20-2008, 08:19 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1