Index and Match Formulas

ralph76

Board Regular
Joined
Nov 18, 2008
Messages
167
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

Here is a sample spreadsheet for which my questions will be related:

A B C D E F G H I J K

Hand No.JohnSusanNickJaneNancySarahMaryRobertMath CheckGame Points
1-444-44
26-6-666
3-22-2-2Error---
410-1010-1010
50000

<tbody>
</tbody>











I'm trying to update a spreadsheet that Mr.Excel Members helped me develop to keep track of each round of scoring of a card game. Here are the formulas I have, along with brief descriptions:

1. Column J (Math Check): IF(SUM(B2:I2)<>0,"Error","")

2. Column K (Game Points): IF(J2="Error","---",IFERROR(ABS(INDEX(B2:I2,MATCH(TRUE,INDEX((B2:I2<>0),0),0))),"")

Notes:
1. The sum total of all scores in each round must add up to zero, which is why I included the Math Check. Note: Hand #3 shows the outputs in columns J and K when an input error results in the scores not adding to zero.

2. The Game Points always equal the number of points in a hand. The reason for the Absolute Value function is if the first score encountered in the Index range is a negative (see Hands #1 and #3 ), it will be converted to a positive. All Game Points must be registered as a positive number.

Current Issue: At the time the Game Points formula was developed for me, I was unaware that zero scores were possible. Unfortunately, with the current Game Points formula, when zeros are input in the score ranges (see Hand #5 ) the formula in cell K6 returns a Blank, not a 0.

Question: Would someone be so kind as to show me how to modify the Game Points formula (or develop a new formula) to show 0s and not Blanks?

Many thanks,
Ralph
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
That formula seems to be a bit overdesigned. Wouldn't

=IF(J2="Error","---",MAX(B2:I2))

work for you?
 
Upvote 0
Wow, Eric, that is PERFECT! Honestly, I never really understood why I needed all those Index and Match functions. This is so much simpler and understandable. Thank you very much!
 
Upvote 0
Sorry, one final question. Is there a way to have the cells in column K (Game Points) show as Blanks until the scores are entered in range B:I?
 
Upvote 0
PERFECT! Thanks again, Eric. I truly appreciate all your help.
 
Upvote 0

Forum statistics

Threads
1,215,361
Messages
6,124,500
Members
449,166
Latest member
hokjock

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