Help with Lookup Function

Copper Contributor

At least I believe it's a look up function.

 

I have created a check register that has a tab for each month of the year.  Each tab has a column for the status of each transaction ("c" for cleared, "u" for uncleared).  

 

Is there a lookup function that I could use to copy a transaction to the tab for the next month if it has a status of uncleared?  Perhaps a formula isn't even the correct method, maybe something in VBA?

 

I've attached my file.

1 Reply

@Trisa58 

Here is a formula that I put in July cell A23 and copied down and across:

=IFERROR(INDEX(June!A$3:A$30,AGGREGATE(15,6,(ROW(A$3:A$30)-ROW(A$3)+1)/(June!$I$3:$I$30="u"),ROWS(A$23:A23))),"")

 

As written, the formula is checking rows 3 to 30 of June worksheet for uncleared items. If any are found, it returns the associated value from each column. When the list of uncleared items is exhausted, the formula will return an empty string (looks like a blank).

 

Note that if the corresponding cell in June is blank, a value of 0 will be returned. If the receiving cell is formatted as a date, it will appear as 1/0/1900.