Transpose value into table meeting conditions from another dynamic table

vij

Board Regular
Joined
Feb 13, 2011
Messages
215
Hi,
I have data as under in a sheet. I want to capture data for any value which exceed 5 in cells ( B16:J16) and the corresponding devices in cells (B1:J1) for that value. The values in cells B16 to J16 keeps on changing daily.
The expected results which are updated daily are shared below the table.

Noida802-1-01 NOI:FLR1 TURN3 IN802-1-17 NOI:FIRE ALARM802-1-26 NOI:FLR3 FIRE STR 1802-1-27 NOI:FLR4 FIRE STR 1802-1-33 NOI:FLR5 FIRE STR 1802-2-00 NOI:SERVICE ELEV802-3-00 NOI:CAFE SIDE DOOR802-3-01 NOI:FLR1 TURN3 OUT802-4-00 NOI:SHIPPING REAR DR
19-Jul-130000000750
20-Jul-1310111801111
21-Jul-1320252222222
22-Jul-13533373333
23-Jul-1364444224444
24-Jul-137575552555
25-Jul-13966696666
26-Jul-13000000000
27-Jul-13000000000
28-Jul-13000000000
29-Jul-13000000000
30-Jul-13000000000
31-Jul-13000000000
Total5721262110739819641
Average422283673
Expected result
LocationDevice NameNo of Alarms
Noida802-1-33 NOI:FLR5 FIRE STR 18
802-3-00 NOI:CAFE SIDE DOOR6
802-3-01 NOI:FLR1 TURN3 OUT7

<tbody>
</tbody>

Thanks,
Vijay
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
That will not do, as the number of alarms will only be populated in the expected results table if the value exceeds 5 and the corresponding device name will also be highlighted then. If the alarms are less than 4.99 then the cells will not be populated.
 
Upvote 0
I think I've found a solution. It's stolen from a solution to a similar question on a different forum site.
[SOLVED] Extracted names from list if value greater than 2

I've assumed that your data is on sheet 2 and your summary is on sheet 1. I've also added a further cell to your summary, stating the number of devices exceeding 5 (Sheet 1, cell B1). Therefore you headings are in cells A2:C2

Under Device Name (B3) {=IF(ROWS($B$3:B3)<=B$1,INDEX(Sheet2!$B$1:$J$1,MATCH(0,IF(Sheet2!$B$16:$J$16>5,COUNTIF($B$1:B1,Sheet2!$B$1:$J$1)),0)),"")}

Under No. of Alarms (C3) {=IF(ROWS($B$3:B3)<=B$1,INDEX(Sheet2!$B$16:$J$16,MATCH(0,IF(Sheet2!$B$16:$J$16>5,COUNTIF($B$1:B1,Sheet2!$B$1:$J$1)),0)),"")}

Under Location (A3) =IF(COUNTA(B3)=1,Sheet2!$A$1,"")

You then drag down these formulas a further 8 rows. Also be aware that the first to formulas are array formulas, and as such you need to press ctrl+shift+enter to get them to work.

Hope this makes sense. If not here's a link to my worksheet.

https://www.dropbox.com/s/1n616dg4j...ng conditions from another dynamic table.xlsx
 
Upvote 0
Thanks QU4487. It works absolutely fine. Thanks for such a prompt reply and solution.
 
Upvote 0
Thanks QU4487, this works just fine. However,once I drag the formula down and across and the values of alarm is less than 5 I get a value of #N/A. Is there any way of avoiding this?
 
Upvote 0
Just realised that my formula for the location was pretty naff. Try this one instead;

=IF(B3="","",Sheet2!$A$1)

You should only be dragging the formulas down. Where do you get the #N/A appearing? I can't seem to replicate your issue.
 
Upvote 0
I have dragged the formula down to cover 15 rows. Therefore for all rows where the value is more than 5 the formula works and for others it becomes #N/A. In case the value for these cells is also greater than 5 then the values are automatically updated. i.e. the formula works just fine.
 
Upvote 0
I can't seem to replicate the issue. Could you post a link to an example of your worksheet?
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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