As growth in China slows after two decades of breakneck economic development, Western companies are increasingly turning towards India and Africa as the next great untapped opportunities. While Africa’s 54 disparate countries and innumerable languages make it a far cry from China’s reasonably cohesive single market, there are several simple reasons so many companies are rushing to expand on the continent. Economic growth has continued unabated despite collapsing commodities prices and fast-growing populations are becoming increasingly wealthy thanks to this. So, how are companies going to profit from a growing consumer class?

Spirits maker Diageo’s (LSE: DGE) plan is twofold. First, the company is pushing for increased sales of Guinness and local beer brands to build links with distributors and consumers alike. The hope is it will be easier in the future to sell the higher margin spirits Diageo is famous for, such as Smirnoff and Johnnie Walker.

Results for the first six months of fiscal 2016 illustrated that parts of this plan are working. Organic volume movement rose 7% and organic net sales were up 3%, although foreign exchange movements meant an actual fall in real-terms sales.

While operating margins in Africa still lag those posted in developed markets, this is to be expected as the company invests heavily in marketing and focuses primarily on lower-margin beer sales. Looking forward, the emphasis Diageo has placed on Africa is remarkable and it now accounts for 13% of revenue, a figure that should continue to grow in the years to come as developed Western markets offer little room for growth.

Core market

Consumer goods giant PZ Cussons (LSE: PZC) is no stranger to Africa, having been founded in Sierra Leone well over a century ago. While the company long ago expanded into Asia and Europe, Africa still provides the majority of revenue and Nigeria alone accounts for roughly 25% of group profits.

However, trading in Nigeria has been poor recently due to high inflation and subsequent currency devaluation. Still, on a constant currency basis, Africa revenue rose a full 17.9% over the past half-year period. Given the company’s market-leadership in Nigeria, Africa’s largest economy, and growing operations in Ghana and Kenya, PZ Cussons is well-placed to benefit in the coming decades from the growing middle classes in these countries.

Exploiting spending power

Ex-Barclays CEO Bob Diamond is obviously more bullish on Africa than his former company, which recently announced plans to divest its African holdings in the coming years. Diamond, after being ousted from Barclays, turned his attention to his new company, Atlas Mara (LSE: ATMA), which invests in banks across Sub-Saharan Africa. Atlas Mara’s stakes in seven separate banks are intended to take advantage of growing spending power among consumers who will require greater access to financial institutions.

Although the company slipped into the red in Q1, it posted an $11.3m net profit in full-year 2015 and expects to exceed this target in 2016. If the bank can do better than larger rivals such as Standard Chartered in avoiding non-performing loans, particularly those related to the commodities sector, this should be a reasonable target thanks to strong performances from Nigerian and Rwandan subsidiaries. The need for banking services is certainly growing across Sub-Saharan Africa, and if mobile banking doesn’t obviate the need for traditional banks, Atlas Mara is well-placed to take advantage of this.

Of course, while this time may be different, African economies have long been subject to peaks and troughs arguably more frequent and violent than any other developing region. Investing in shares that have tied their fates to such a volatile continent without fully understanding the associated risks could be straight out of the Motley Fool's latest free report, The Worst Mistakes Investors Mistake.

This collection of investing wisdom from the Fool's top analysts across the globe is a great refresher for new and experienced investors alike on how to avoid the most common investing errors.

To learn which of these mistakes you may be making, and how to correct them, simply follow this link for your free, no obligation copy of the report.

Ian Pierce has no position in any shares mentioned. The Motley Fool UK owns shares of PZ Cussons. The Motley Fool UK has recommended Barclays and Diageo. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.