Dynamic Excel Column Chart that Only Displays Non-Blank Values

GoodMD

New Member
Joined
Jan 21, 2014
Messages
5
Good Day Everyone,

This is my first post and I would ask that if I have made any posting errors that someone would be so kind as to point them out to me. Although I have read all of the rules and guidelines, I may have missed something.

On to my problem. I am using Excel 2010 on Windows 7 Enterprise and trying to develop named ranges for the sheets in a workbook that will allow only the cells with values in them to be displayed in a chart. I have a shared workbook on our network that I cannot use VBA on because the owners what the extension to remain xlsx. With that said, I have a chart with named ranges that sort of works where each sheet's named range is like the one below.

=OFFSET(Initiator!$M$2,0,0,COUNTIF(Initiator!$L:$L,"<>")-1,1)

The problem is that in this instance the chart displays the values for Cells M2, M3, M4, M5 and M8, with two blank spaces between M5 and M8, along with two blank spaces after M8. As can be seen by the data below there are values in Cells M15, M18, M19 and M21. But, these are not displayed in the chart. All of the cells in Column M have a formula in them producing the values shown.

I have found the perfect solution in a You Tube demonstration at https://www.youtube.com/watch?v=JA2r_9RjLCs. The resultant array formula that I thought should work is:

{=IF(COUNT($M$2:$M$20)>=ROWS(M$2:M2),INDEX($J$2:$J$20,MATCH(SMALL(IF(LEN($M$2:$M$20)>0,ROW($M$2:$M$20),""),ROWS(M$2:M20)),ROW($M$2:$M$20),0),1),"")}

Unfortunately, I get a #NUM! error in all of the cells that I try to apply it to. My INDEX and MATCH knowledge is week, at best, even after countless hours of reviewing their usage and trying to apply it to my problem.

I have found a couple of posts on Mr. Excel and a couple elsewhere that were close to helping, but fell short for one reason or another in allowing me to resolve this issue. If anyone can help me find a solution to this problem with a little explanation on how their formula is put together, I would be most appreciative.

Thank You in Advance,
GoodMD

Excel 2010 32 bit
J
K
L
M
1
CR#Date/Time ReceivedDate/Time CompletedTime Elapsed
2
SC16-0500-001
10/13/16 3:00 PM​
10/13/16 23:00​
8.0​
3
SC17-0008-001
1/4/17 12:31 PM​
1/6/17 7:00​
42.5​
4
SC17-0009-001
1/4/17 12:31 PM​
1/6/17 7:00​
42.5​
5
SC17-0019-001
1/6/17 1:06 PM​
1/9/17 11:00​
21.9​
6
SC17-0020-001
1/6/17 2:05 PM​
7
SC17-0021-001
1/9/17 12:08 PM​
8
SC17-0021-002
1/9/17 12:16 PM​
1/9/17 13:00​
0.7​
9
SC17-0022-001
1/9/17 1:38 PM​
10
SC17-0023-001
1/9/17 1:39 PM​
11
SC17-0026-001
1/10/17 8:32 AM​
12
SC17-0026-002
1/10/17 8:35 AM​
13
SC17-0027-001
1/10/17 8:47 AM​
14
SC17-0028-001
1/10/17 9:08 AM​
15
SC17-0030-001
1/10/17 10:26 AM​
1/10/17 11:15​
0.8​
16
SC17-0031-001
1/10/17 1:30 PM​
17
SC17-0032-001
1/11/17 7:46 AM​
18
SC17-0033-001
1/11/17 7:52 AM​
1/11/17 10:15​
2.4​
19
SC17-0034-001
1/11/17 7:58 AM​
1/11/17 10:15​
2.3​
20
SC17-0034-002
1/11/17 7:58 AM​
21
SC17-0034-003
1/11/17 7:58 AM​
1/11/17 10:15​
2.3​
22
23
24

<tbody>
</tbody>
Sheet: Initiator

<tbody>
</tbody>
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
0
61####16^^^^^
5225
37
7348
59
84
95
####
=IF(A2="","",MAX($B$1:B1)+1)
^^^^
=OFFSET($B$1,MATCH(D2,$B$2:$B$8,0),-1)
now chart column E

<colgroup><col width="64" span="9" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
Thank You oldbrewer for your reply and what looks like a much simpler solution than what I was agonizing over. I am not sure what I am doing wrong, but I've copied the table and formulas that you provided to get what is shown below.

Formula =IF(A2="","",MAX($B$1:B1)+1) went in Cell D2 and I dragged it down to D8, while formula =OFFSET($B$1,MATCH(D2,$B$2:$B$8,0),-1) went in Cell E2 and it too was dragged down to E8. As can be seen I ended up with blanks and #N/As instead of the rows filling in the blank cells as your example shows. Any guess on what I am doing wrong.

Thank You Again,
GoodMD


Excel 2010 32 bit
A
B
C
D
E
F
1
0​
2
6​
1​
####
1​
6​
^^^^
3
5​
2​
2​
5​
4
#N/A​
5
7​
3​
3​
7​
6
#N/A​
7
8​
4​
4​
8​
8
9​
5​
5​
9​

<tbody>
</tbody>
Sheet: Sheet1

<tbody>
</tbody>
 
Upvote 0
Thank You again oldbrewer, but this doesn't resolve the issue. And I am guessing I wasn't very clear in my original question. Columns J and K are automatically populated from another sheet by one user. When a different user populates a cell in Column L, then the adjacent cell in Column M is also populated via a formula. The results of the populated cells in Column M are what will appear in the bar chart without any blanks appearing in between the data points that have a value greater than 0. Although the first user will be adding information that is transferred to the second sheet (Columns J and K) in a sequential order, the second user will NOT necessarily be adding information in Column L in sequential order. Which means that the difference value in Column M (chart data points) will have blank rows wherever Column L's rows are blank. My quest is a formula that will populate the chart with all non 0 values in Column M in a dynamic manner.
 
Upvote 0
this is a header row
15
5129
37
9248
7354
8466
78
89
4594
66
87
98
49
I do not know what you want
my approach lists only non blank rows for you to plot
in real life columns B and C could be date and quantity
the offset match formula can get those the same way

<colgroup><col span="13"></colgroup><tbody>
</tbody>
 
Upvote 0
Problem Solved. I have worked out the problem, finally. I've added Cell S2 to act as a counter of non-blank cells in Column M with "=COUNT(M2:M3000)". Then in Column T have added the array formula of "{=IF(ROWS($T$2:T2)>$S$2,"",INDEX(J$2:J$3000,SMALL(IF(ISNUMBER($M$2:$M$3000),ROW($M$2:$M$3000)-ROW($D$2)+1),ROWS($T$2:T2))))}" to show all of the documents that have been completed and in Column U the formula to show all of the values that will be charted without any blanks in between "{=IF(ROWS($T$2:U2)>$S$2,"",INDEX(M$2:M$3000,SMALL(IF(ISNUMBER($M$2:$M$3000),ROW($M$2:$M$3000)-ROW($D$2)+1),ROWS($T$2:U2))))}.

I appreciate oldbrewer's help in steering me to the resulting answer.

Kind Regards,
GoodMD

Excel 2010 32 bit
J
K
L
M
S
T
U
1
CR#Date/Time ReceivedDate/Time CompletedTime ElapsedCountCR NumberQty
2
SC16-0500-001
10/13/16 3:00 PM​
10/13/16 23:00​
8.0​
16​
SC16-0500-001
8.0​
3
SC17-0008-001
1/4/17 12:31 PM​
1/6/17 7:00​
42.5​
SC17-0008-001
42.5​
4
SC17-0009-001
1/4/17 12:31 PM​
1/25/17 12:36​
360.1​
SC17-0009-001
360.1​
5
SC17-0019-001
1/6/17 1:06 PM​
1/9/17 11:00​
21.9​
SC17-0019-001
21.9​
6
SC17-0020-001
1/6/17 2:05 PM​
1/6/17 16:00​
1.9​
SC17-0020-001
1.9​
7
SC17-0021-001
1/9/17 12:08 PM​
SC17-0027-001
3.2​
8
SC17-0021-002
1/9/17 12:16 PM​
SC17-0028-001
62.9​
9
SC17-0022-001
1/9/17 1:38 PM​
SC17-0030-001
0.8​
10
SC17-0023-001
1/9/17 1:39 PM​
SC17-0033-001
2.4​
11
SC17-0026-001
1/10/17 8:32 AM​
1/27/2017 1:31:00:00 PMSC17-0034-001
2.3​
12
SC17-0026-002
1/10/17 8:35 AM​
1/27/2017 1:31:00:00 PMSC17-0058-001
24.1​
13
SC17-0027-001
1/10/17 8:47 AM​
1/10/17 12:00​
3.2​
SC17-0058-002
24.1​
14
SC17-0028-001
1/10/17 9:08 AM​
1/13/17 0:00​
62.9​
SC17-0066-001
20.5​
15
SC17-0030-001
1/10/17 10:26 AM​
1/10/17 11:15​
0.8​
SC17-0078-001
41.7​
16
SC17-0031-001
1/10/17 1:30 PM​
SC17-0090-001
25.1​
17
SC17-0032-001
1/11/17 7:46 AM​
SC17-0087-001
42.2​
18
SC17-0033-001
1/11/17 7:52 AM​
1/11/17 10:15​
2.4​
19
SC17-0034-001
1/11/17 7:58 AM​
1/11/17 10:15​
2.3​
20
SC17-0054-001
1/17/17 9:06 AM​
21
SC17-0058-001
1/17/17 10:05 AM​
1/18/17 10:10​
24.1​
22
SC17-0058-002
1/17/17 10:07 AM​
1/18/17 10:11​
24.1​
23
SC17-0065-001
1/18/18 3:49 PM​
24
SC17-0066-001
1/20/17 11:43 AM​
1/23/17 8:10​
20.5​
25
SC16-1497-001
1/19/17 16:15​
26
SC17-0077-001
1/24/17 10:43 AM​
27
SC17-0078-001
1/24/17 3:20 PM​
1/26/17 9:05​
41.7​
28
SC17-0079-001
1/25/17 7:51 AM​
29
SC17-0083-001
1/26/17 9:17 AM​
30
SC17-0051-001
1/13/17 9:13 AM​
31
SC17-0083-002
1/13/17 9:13 AM​
32
SC17-0033-002
1/27/17 8:29 AM​
33
SC16-1474-010
1/27/17 8:32 AM​
34
SC16-1474-010
1/27/17 8:32 AM​
35
SC17-0089-001
1/27/17 2:08 PM​
36
SC17-0090-001
1/27/17 3:02 PM​
1/30/17 16:05​
25.1​
37
SC17-0087-001
1/27/17 2:41 PM​
1/31/17 8:56​
42.2​

<tbody>
</tbody>
Sheet: Initiator

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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