You are here:

Excel/Repeating IF Statement



I'm am trying create a list using a repeating IF statement. I have two sheets: one with raw data, and one with inputs/outputs.

Sheet 1:


(Cells A1, A2)

Sheet 2:
Name 1    7/29/2014
Name 2    7/2/2014
Name 3    6/10/2014
Name 4    6/18/2014
Name 5    6/13/2014
Name 7    6/3/2014
Name 8    6/9/2014
Name 9    8/1/2014
Name 10   6/11/2014

(Cells A1:B10)

Below the dates on sheet 1 I have an IF(AND statement to pull cells that fall between the two dates listed. I'm only able to do this for a single cell on sheet two. This formula would be on sheet 1: IF(AND(A1<Sheet 2!B1,A2>Sheet 2!B1),Sheet 2!A1,unsure from here).

I'd like the formula to repeat itself down the whole array on Sheet 2, returning only the names that fall within the specified date range. Any ideas?


You can use just a blank spaceholder or some message for the "unsure from here" part, this will  populate only those cells which have the dates in your range, others will show a message.
You'll ofcourse need to have to copy the formula to the whole column for each cell to populate.

Another, easier solution could be to simply use the data filters and select dates with in a range.

Hope this helps.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts




I can answer questions related to the following topics: 1. MS Excel - Creating and Linking Formulae, Running Pivot Tables, Vlookup etc. 2. Macros / VBA - Creating Macros to do specific jobs. Importing / Exporting / Validating Data in excel through Macros.


I've been working on excel for over 10 years and on VBA macros for over 3 years now.

Bachelor of Commerce, Chartered Accountant from The Institute of Chartered Accountants of India

©2017 All rights reserved.