You can do that as either a Stacked Bar or as a Stacked Bar 100%
Using a Stacked Bar The Left highlighted Icon above you have to manually or via Formula set the lengths of the bars to either percentages or values that add up to what you want to achieve
Using Stacked Bar 100%, the right highlighted icon, Excel simply takes the values you have given it and assumes the Total is 100%, then pro-ratas the bars accordingly
If you want more specific help can you please post a sample file