Reading across a row of cells to grab only one result.

Nathan Asius

New Member
Joined
Jan 15, 2024
Messages
41
Office Version
  1. 365
Platform
  1. Windows
This is probably and easy solution when the right function is learned.
I'm building a calculator to cost out a custom list of products. There are many choices a customer has and I'm trying to account for all of them.
I uploaded a sample screenshot of what this will look like.
My worksheet I have had to use some helper cells in column C,D,E, and F. These will eventually be hidden, but the results in each of those cells will display a price based on user selections elsewhere.
In column G, I have my total that will take the price of one those columns only. So over the 4 columns the only way I could figure out to display in column G, is with the following IF(AND formula
In Cell G2 it looks like this:
=IF(AND(C2="",D2="",E2=""),F2,IF(AND(C2="",E2="",F2=""),D2,IF(AND(C2="",D2="",F2=""),E2,IF(AND(D2="",E2="",F2=""),C2))))
But this formula can only read for blanks and doesn't account for, or filter out, N/A or FALSE results.

Is there a more simple function I can put in G that can read across all four cells and account for and filter out for Blanks, N/A, and FALSES, or anything else that could appear other than a price (number)?
 

Attachments

  • Screenshot 60.png
    Screenshot 60.png
    14.8 KB · Views: 7

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
How about
Excel Formula:
=MAX(TOROW(C2:F2,3))
 
Upvote 0
Solution
I tested this and it surely doesn't pick up string of characters, blanks, #N/As or Falses. It only picks up numbers.
So I knew it would be a simple function making for a simple solution. But that doesn't understate my gratitude Fluff, for answering this for me. Thank you.
I'll look at the function helper to understand what it's doing so I can use this
 
Upvote 0
How about
Excel Formula:
=MAX(TOROW(C2:F2,3))
On my second test, the only way this formula doesn't work completely, is that it doesn't pick up a 0.00 result. I need that. Could you modify the result to have this included in G?
 
Upvote 0
Do you mean if none of the cells contain a number?
 
Upvote 0
Do you mean if none of the cells contain a number?
Well, depending on what is considered a number. 0.00 may be zero for some, and a number for others. In my case, I need a 0.00 to show in G, from any one of the C to F columns it shows up in.
 
Upvote 0
If 0 is the only number in the range, then that is what the formula will return.
 
Upvote 0
My mistake. It's fine after all. My G column had results formatted in Accounting. Once I changed it to Currency it gives me the $0.00 I wanted which is pulled from one of the other columns.
Thanks again.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,068
Messages
6,122,950
Members
449,095
Latest member
nmaske

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