=INDEX doens't return value as percentage

AlexJanetzky

New Member
Joined
May 4, 2023
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I have a table such as the one below and this is linked to a dashboard where I have used the following formula to return the value of the last period: =INDEX(BM33:DF33;AANTAL(BM33:DF33)-1) (this works)
In the dashboard I also want to show the value of the previous periode, in this case P2 and have used the following formula: =INDEX(BM32:DF32;AANTAL(BM33:DF33)-1)&": "&INDEX(BM33:DF33;AANTAL(BM33:DF33)-1)

The formula works but it doesn't return the value as a percentage but as "P2: 0,06", and I would want to see "P2: 6,0%)


P1P2P3P4
5,2%6,0%8,3%



Can someone please help me with this?

Regards,
Alex
 

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.
Welcome to the Board!

Once you make it a concatenation (combining multiple values together with an &), it is returning a string, which means formatting has no effect on it (you can only format numeric values).
You can use the TEXT function to apply formatting to that particular part of the calculation, i.e.
Rich (BB code):
=INDEX(BM32:DF32;AANTAL(BM33:DF33)-1)&": "& TEXT(INDEX(BM33:DF33;AANTAL(BM33:DF33)-1);"0,0%")
 
Upvote 0
Alex, please tell us what language of excel you use? I do not know the AANTAL function.
 
Upvote 0
Hi & welcome to MrExcel.
Try
Excel Formula:
=INDEX(BM32:DF32,AANTAL(BM33:DF33)-1)&": "&TEKST(INDEX(BM33:DF33,AANTAL(BM33:DF33)-1),"0.0%")
 
Upvote 0
Sorry, I use Dutch. Aantal = Count in English
Looks like Fluff already figured that out, and the TEXT function in Dutch is actually TEKST.
So his answer is probably the closest, though you may need to change "0.0%" to "0,0%", i.e.
Excel Formula:
=INDEX(BM32:DF32,AANTAL(BM33:DF33)-1)&": "&TEKST(INDEX(BM33:DF33,AANTAL(BM33:DF33)-1),"0,0%")
 
Upvote 0
Hi!

Thanks for all the quick replies. I get an error though when I add the suggested ,"0,0%" in combination with the TEKST.
 
Upvote 0
In that case can you post some sample data showing the problem.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
I got it to work, amazing!

Thanks so much for all the help and quick replies!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,394
Messages
6,124,683
Members
449,180
Latest member
kfhw720

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