Returning the value

  • Thread starter Thread starter Returning the value
  • Start date Start date
R

Returning the value

"I am having a table containing sum values i.e,
1)1325521
2)121541
3)212181
4)121
If I search for value 216703
Then it should return me the value 4522 + 212181 =216703

kindly let me know the solution for the same.

"
 
Try this

In Col A put all your values..Sort in ascending order.
In B1 enter search value 216703
In C1

=IF(ISNA(VLOOKUP(B1,A2:A10,1,TRUE)),0,B1-VLOOKUP(B1,A2:A10,1,TRUE)) & " + "
& VLOOKUP(B1,A2:A10,1,TRUE) & " = " & B1


This will return error if you enter a value which is less than the smallest
value in ColA. This can be handled easily....but the logic still remains the
same....Adjust to suit...Try and feedback

If this post helps click Yes
 
'Revised one.try with a unsorted list..

=IF(ISNA(VLOOKUP(B1,A1:A10,1,TRUE)),0,B1-VLOOKUP(B1,A1:A10,1,TRUE) & " + " &
VLOOKUP(B1,A1:A10,1,TRUE) & " = " & B1)

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top