Report data from one cell in a string of cells

LValencia

New Member
Joined
Dec 14, 2016
Messages
10
What I have is 5 cells in a row that may or may not have data. What I want is, if one or more cells have data I only want a particular cells data this would be the primary cell. This data would be collected in another cell in the sheet.
Example:
P1 20, Q1 0, R1 50, S1 10, T1 5. R1s data will always be used unless it is zero, then it would be P1s data. The formula would be in cell F1.
thanks for your help
tried several formulas but cant seem to get there.:(
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Welcome to the board. In cell F1 try:

=if(R1=0,P1,R1)
 
Upvote 0
You're welcome, counta checks if any cells in the range have a value, if they do then returns P1 or R1, if no values then returns blank.
 
Upvote 0
Great thanks, one other question can I step it down, if P1 doesnt have value report S1, if no value then T1. Tried adding to formula but got error, no expert here learning from the board how to improve my formulas.
 
Upvote 0
Try

I haven't tested this

=IF(COUNTA(P1:T1),IF(R1<>0,R1,IF(P1<>0,P1,IF(Q1<>0,Q1,IF(S1<>0,S1,T1)))),"")
 
Upvote 0
Worked great thank you for your time and expertise.
Merry Christmas and happy new year.
Go Saints (south hampton)
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,684
Members
448,977
Latest member
dbonilla0331

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