Error when using roundup and index in same formula

Sylver75

New Member
Joined
Nov 7, 2022
Messages
7
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I've searched your forum, and this post came close, but not quite the same: Spill dynamic array across multiple columns with a defined depth.
I have an excel sheet that looks as below:
1667833957346.png


my current formula:
=INDEX(Business!B2:L7, MATCH(B3,Business!B2:B7,0)9)*100
Check a designated list against column B, and gives the correct % results (on example above, it would check Description B and return results 35).

I tried to add a roundup to it: =ROUNDUP(INDEX(Business!B2:L7, MATCH(B3,Business!B2:B7,0)),9)*100 but I get error #REF.
When I evaluate the steps, it shows:
=ROUNDUP(INDEX(Business!B2:L7, MATCH(B3,Business!B2:B7,0)),9)*100

=ROUNDUP(INDEX(Business!B2:L7, MATCH(B,Business!B2:B7,0)),9)*100

=ROUNDUP(INDEX(Business!B2:L7,2),9)*100

=ROUNDUP(#REF!,9)*100

#REF!*100

#REF!

I think the problem might be in the second parenthesis added after number 0, however if I try adding the parenthesis at the end or anywhere else, I get an error: "You've entered too few arguments for this function".

Any help is appreciated.
 
The reason why it did not work had nothing to do with the ROUNDUP part.
Your original formula was NOT a working formula (it had an unbalanced number of parentheses).

Note that you could have simply removed the parentheses after the "*100" too, i.e.
Excel Formula:
=ROUNDUP(INDEX(Business!B2:L7, MATCH(B3,Business!B2:B7,0),9)*100,0)

A good rule of thumb for debugging these sort of nested formulas is to work from the "inside-out".
Start off the MATCH formula.
When you get that working, then add the INDEX part.
And then when you get that working, add the ROUNDUP part.
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
The reason why it did not work had nothing to do with the ROUNDUP part.
Your original formula was NOT a working formula (it had an unbalanced number of parentheses).

Note that you could have simply removed the parentheses after the "*100" too, i.e.
Excel Formula:
=ROUNDUP(INDEX(Business!B2:L7, MATCH(B3,Business!B2:B7,0),9)*100,0)

A good rule of thumb for debugging these sort of nested formulas is to work from the "inside-out".
Start off the MATCH formula.
When you get that working, then add the INDEX part.
And then when you get that working, add the ROUNDUP part.
You are correct. My original ROUNDUP formula had a parenthesis in the wrong place. Because any other place I added the closing parenthesis, would just give me a popup that said: "You've entered too few arguments for this function" (as I was missing the second argument and was unawares if it), but adding it right after the 0 caused the REF error. As the idiot that I am, I though that meant it was the right place, and there was something else wrong with it. Learning lesson.
 
Upvote 0
You are correct. My original ROUNDUP formula had a parenthesis in the wrong place. Because any other place I added the closing parenthesis, would just give me a popup that said: "You've entered too few arguments for this function" (as I was missing the second argument and was unawares if it), but adding it right after the 0 caused the REF error. As the idiot that I am, I though that meant it was the right place, and there was something else wrong with it. Learning lesson.
Yeah, I find sometimes when there is a lot of stuff going on, it is easy to not "see the forest for the trees".
It those cases, I usually find it works best to start from the beginning, and build your way up.
Then it is much easier to see exactly what might be causing the error.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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