Get values from a range based on certain conditions

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,213
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Cell Q4 & R4 generates numerical values.
Range K3:P5 also generates numerical values.

In B4 I require the cell’s value from K4:P4 which is equal to Q4 provided Q4>0. Thereafter, in B3 I require the corresponding value from K3:P3 and in B5 I require the corresponding value from K5:P5
Similarly, In C4 I require the cell’s value from K4:P4 which is equal to R4 provided R4>0. Thereafter, in C3 I require the corresponding value from K3:P3 and in C5 I require the corresponding value from K5:P5

How to accomplish?
Thanks in advance
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
i suspect i maybe missunderstanding exactly what after
But my interpretation of the question is this

Book3
ABCDEFGHIJKLMNOPQR
1
2
3120020020040060080012001400
412224681214122
51200002000020000400006000080000120000140000
6
7
8
Sheet1
Cell Formulas
RangeFormula
B3:C3B3=INDEX($K$3:$P$3,MATCH(B4,$K$4:$P$4,0))
B4:C4B4=IF(Q4>0,Q4,"")
B5:C5B5=INDEX($K$5:$P$5,MATCH(B4,$K$4:$P$4,0))
L5:P5L5=L4*10000


Otherwise - it would be better to
Provide

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
Solution
i suspect i maybe missunderstanding exactly what after
But my interpretation of the question is this
etaf You understood correctly & this is what I needed. Thanks for it & your efforts.
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,077
Members
449,094
Latest member
mystic19

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