Runawaygeek
New Member
- Joined
- Nov 28, 2017
- Messages
- 6
Hi guys,
I had a formula, that would copy data from a cell to another sheet, based on a value in another cell within the Row. To do this, I had a count formula on the end, that added 1 each time the trigger value was met. But the first cell was its own formua as i needed the option of a 0
=IF(C2="AAA",1,0)
=IF(C3="AAA",D1+1,D1)
So my data would be something like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID
[/TD]
[TD]Title
[/TD]
[TD]Category
[/TD]
[TD]Count
[/TD]
[/TR]
[TR]
[TD]01
[/TD]
[TD]Book one
[/TD]
[TD]DDD
[/TD]
[TD]=IF(C2="AAA",1,0)
[/TD]
[/TR]
[TR]
[TD]02
[/TD]
[TD]Book two
[/TD]
[TD]AAA
[/TD]
[TD]=IF(C3="AAA",D1+1,D1)
[/TD]
[/TR]
[TR]
[TD]03
[/TD]
[TD]Book Six
[/TD]
[TD]FFF
[/TD]
[TD]=IF(C3="AAA",D2+1,D2)
[/TD]
[/TR]
[TR]
[TD]04
[/TD]
[TD]Book three
[/TD]
[TD]AAA
[/TD]
[TD]=IF(C3="AAA",D3+1,D3)
[/TD]
[/TR]
</tbody>[/TABLE]
in count i would get 0, 1, 1, 2
If row 04, had another category, then i would get 0,1,1,1
All this is sheet 1
Then in sheet two, where i would want to return just Rows 2 and 3 all neatly packed up the top.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Title
[/TD]
[TD]Count
[/TD]
[/TR]
[TR]
[TD]Book two
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]Book three
[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
I have forgotten the formula that would allow me to pack it up, If I do a basic Index and Match, it only works if I have blank rows included.
Anyone got any ideas what i was on about, i know it worked, just forgot. I also am pretty sure it was an array formula, (ctrl shift enter)
I also realise that if i want the other Categories on new sheets, i would need to add other count columns, when i did this last time i have 6 of these.
Thanks for any help,
Ben
I had a formula, that would copy data from a cell to another sheet, based on a value in another cell within the Row. To do this, I had a count formula on the end, that added 1 each time the trigger value was met. But the first cell was its own formua as i needed the option of a 0
=IF(C2="AAA",1,0)
=IF(C3="AAA",D1+1,D1)
So my data would be something like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID
[/TD]
[TD]Title
[/TD]
[TD]Category
[/TD]
[TD]Count
[/TD]
[/TR]
[TR]
[TD]01
[/TD]
[TD]Book one
[/TD]
[TD]DDD
[/TD]
[TD]=IF(C2="AAA",1,0)
[/TD]
[/TR]
[TR]
[TD]02
[/TD]
[TD]Book two
[/TD]
[TD]AAA
[/TD]
[TD]=IF(C3="AAA",D1+1,D1)
[/TD]
[/TR]
[TR]
[TD]03
[/TD]
[TD]Book Six
[/TD]
[TD]FFF
[/TD]
[TD]=IF(C3="AAA",D2+1,D2)
[/TD]
[/TR]
[TR]
[TD]04
[/TD]
[TD]Book three
[/TD]
[TD]AAA
[/TD]
[TD]=IF(C3="AAA",D3+1,D3)
[/TD]
[/TR]
</tbody>[/TABLE]
in count i would get 0, 1, 1, 2
If row 04, had another category, then i would get 0,1,1,1
All this is sheet 1
Then in sheet two, where i would want to return just Rows 2 and 3 all neatly packed up the top.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Title
[/TD]
[TD]Count
[/TD]
[/TR]
[TR]
[TD]Book two
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]Book three
[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
I have forgotten the formula that would allow me to pack it up, If I do a basic Index and Match, it only works if I have blank rows included.
Anyone got any ideas what i was on about, i know it worked, just forgot. I also am pretty sure it was an array formula, (ctrl shift enter)
I also realise that if i want the other Categories on new sheets, i would need to add other count columns, when i did this last time i have 6 of these.
Thanks for any help,
Ben