Extracting rows with a specific date

LisetteR

New Member
Joined
May 16, 2011
Messages
6
Hi, I have used Excel Magic Trick 185 to copy data from one list to another in a different worksheet. It comes up with a circular reference and I wondered if anyone could tell me what I'm doing wrong.

=IF(ROWS(A$32:A32)<=$K$3,INDEX(INDIRECT($A$31),SMALL(IF(Date=$I$3,ROW(Date)-ROW(DailyProgressLog!$A$14)+1),ROWS(A$32:A32))),"")

Cell A31 on the second worksheet is the Title "Date". K3 counts the number of occurences and is working. When I break the formula into parts the Small function box produces the right number (I think!) but it only shows 0 in the cell when I press enter.

I can send/attach jpgs if anyone is interested in seeing them for more info.

Many thanks in advance.

Lisette
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi, I have used Excel Magic Trick 185 to copy data from one list to another in a different worksheet. It comes up with a circular reference and I wondered if anyone could tell me what I'm doing wrong.

=IF(ROWS(A$32:A32)<=$K$3,INDEX(INDIRECT($A$31),SMALL(IF(Date=$I$3,ROW(Date)-ROW(DailyProgressLog!$A$14)+1),ROWS(A$32:A32))),"")

Cell A31 on the second worksheet is the Title "Date". K3 counts the number of occurences and is working. When I break the formula into parts the Small function box produces the right number (I think!) but it only shows 0 in the cell when I press enter.

I can send/attach jpgs if anyone is interested in seeing them for more info.

Many thanks in advance.

Lisette
Why would you use INDIRECT to refer to Date but then at the same time use SMALL(IF(Date ?

There's a good example of how to do this here:

http://www.mrexcel.com/forum/showpost.php?p=2696961&postcount=3
 
Upvote 0
Hi,

Thank you for your reply.

I have tried the suggestion and I am getting the same result, it seems that it is not recognising the I3 date cell, or the correct row selection, although it is putting in the right number of rows.

This is the new code:
=IF(ROWS(A$32:A32)>$K$3,"",INDEX(Date,SMALL(IF(Date=$I$3,ROW(Date)),ROWS(A$32:A32))))

My data table has defined headers at row 13 if that makes a difference.

Thanks,

Lisette
 
Upvote 0
Hi,

Thank you for your reply.

I have tried the suggestion and I am getting the same result, it seems that it is not recognising the I3 date cell, or the correct row selection, although it is putting in the right number of rows.

This is the new code:
=IF(ROWS(A$32:A32)>$K$3,"",INDEX(Date,SMALL(IF(Date=$I$3,ROW(Date)),ROWS(A$32:A32))))

My data table has defined headers at row 13 if that makes a difference.

Thanks,

Lisette
Ok, it looks like you simply want to list the dates if they are the same as the date entered in I3. Is that correct?

Is there more to this or is that all you're wanting to do?
 
Upvote 0
Hi yes that's exactly it.

I have a DailyProgressLog sheet where we will record:
A13 Date
B13 Start time
C13 End Time
D13 Desciption (of Activity)
E13 Activity Code
F13 ActivityTime (Calculates time spent on activity from Start and End Time)

Then in the DailyProgressReport sheet I have a daily report with a space to show the activities (with the above column headings) for the date specified in cell I3.

Thanks,

Lisette
 
Upvote 0
Hi yes that's exactly it.

I have a DailyProgressLog sheet where we will record:
A13 Date
B13 Start time
C13 End Time
D13 Desciption (of Activity)
E13 Activity Code
F13 ActivityTime (Calculates time spent on activity from Start and End Time)

Then in the DailyProgressReport sheet I have a daily report with a space to show the activities (with the above column headings) for the date specified in cell I3.

Thanks,

Lisette
Ok, if you only need to extract one row of data based on a date you could use a much less complicated VLOOKUP formula.

See if this is what you had in mind.

Let's assume this is your Daily Progress Log...

Book1
ABCDEF
12DateStartEndDescriptionCodeTime
135/1/20117:00 AM10:25 AMX105
145/2/20118:15 AM9:40 AMY3010
155/3/20117:50 AM11:35 AMZ207
165/4/20119:55 AM10:20 AMX1021
175/5/20112:10 PM4:00 PMZ1010
185/6/20111:20 PM5:10 PMY2020
Sheet1

And this is your summary area...

Book1
ABCDEF
1Look up_____
2DateStartEndDescriptionCodeTime
35/3/20117:50 AM11:35 AMZ207
Sheet1

Enter this formula in B3 and copy across to F3:

=VLOOKUP($A3,$A$13:$F$18,COLUMNS($A2:B2),0)
 
Upvote 0
Hi, I am really appreciating your help here!

There are more than 1 lines with the same date as we would complete different activities during the day.

Thanks,

Lisette
 
Upvote 0
Hi, I am really appreciating your help here!

There are more than 1 lines with the same date as we would complete different activities during the day.

Thanks,

Lisette
Ok, I'll put together a sample file...

Give me a few minutes...
 
Upvote 0
Ok, I'll put together a sample file...

Give me a few minutes...
Here's a small sample file that demonstrates this.

The array formula entered on Sheet1 in D3 is copied across to I3 then down until you get blanks. You have to copy the formula to enough rows to ensure you get all the records of interest. How many rows will that be? Only you know the answer to that!

zzzLisetteR.xls 23kb

http://cjoint.com/?AErrzz6b1em
 
Upvote 0
Hi, just wanted to say thankyou.

I'm still having trouble with this as it doesn't seem to pick the right row and it doesn't work on the rows below.

I will be back later but need to park this for a while as have other work!

Many thanks, Lisette
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,734
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top