Removing a Blank in a index():index() Function

CSCP_EXCEL

New Member
Joined
May 7, 2020
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Hello, I am creating a dynamic chart where my series values and series axis labels are stored in name manager. The References are an array created by the index():index() function. The problem I am having is that when the array area sometimes has values in it and sometimes it does not as it is also dynamic. This creates an extra place on my chart where the value and axis label "" are created by this "" in the array. How do I remove the blank in a dynamic array? Here is a sample of the formula:

" =INDEX($AT$8:$AT$30,MATCH($U$11,$AT$8:$AT$30,0)):INDEX($AT$8:$AT$30,MATCH($U$12,$AT$8:$AT$30,0)):INDEX($AT$8:$AT$30,MATCH($U$13,$AT$8:$AT$30,0)):INDEX($AT$8:$AT$30,MATCH($U$14,$AT$8:$AT$30,0)):INDEX($AT$8:$AT$30,MATCH($U$15,$AT$8:$AT$30,0)):INDEX($AT$8:$AT$30,MATCH($U$16,$AT$8:$AT$30,0))

"
The AT column has the product I am looking for, which I am matching to another list that only populates the product if the correct combo box for the category is selected. When there are not enough products to fill the list my IF Function that returns a "" is saved in the array, but not all of them, just the first. The U column is where the dynamic product source list populates.

I am happy to clarify if necessary, thank you.

-Tyler
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
That is not creating an array, it is creating a simple range from a union, only 2 out of the 6 index functions serve any real purpose.

I don't think that you would be able to pass an actual array to a chart (not tried it so could be wrong), I would suspect that you would need to duplicate your data in a new range with the blanks omitted, then use that range to feed the chart (similar to the method I used in the link below to omit duplicates from column F into column D).
 
Upvote 0
Ok, a Range, pardon. The range needs to expand and contract based on the user input. I am achieving this using the function above but it is also including the first blank cell below it. I would be interested in seeing how you omit blanks(I do not see your link) in copying your range as my current method:

=IF($U14<>"",INDEX($U14:$U$29,$D$8,),"")

Omits them, at least in view; however the index function I am using is picking it up. I am hoping it is something to do with how I am misusing the function. Thank you for your reply.
 
Upvote 0
Sorry, thought I had pasted the link. This one is removing duplicates rather than blanks, but the principle needed would be very similar.

 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,749
Members
449,094
Latest member
dsharae57

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