# How to compare multiple rows in an IF statement

1. ## How to compare multiple rows in an IF statement

Hello! I'm new here and could use some assistance. I have an excel sheet where I'm trying to write a function to see if a claim is valid or not. Column A is a name, Column B is a date, and Column C is my Formula. A claim is valid if the name is new or if the last 'approved' claim was more than 365 days ago.

My current formula now if: =IF(A3=A2,IF(B3>B2+365,"Approved","Denied"),"Approved")

This issue I'm running into is 'Mary' could submit 4 different claims where the 4th claim is more then 365 days past the 1st claim but less than 365 days past the 3rd claim. Because the formula is just looking at the row before it's wrongly denying the claim. How can I get excel to compare multiple lines together.

Thanks!

2. ## Re: How to compare multiple rows in an IF statement

Hi lanmel. Welcome to the forum.

Try this formula.
Formula:
`Please Login or Register  to view this content.`

3. ## Re: How to compare multiple rows in an IF statement

Thank you!!! Seriously a life saver.

4. ## Re: How to compare multiple rows in an IF statement

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

#### 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