#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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.

"

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Returning the value

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
---------------
Jacob Skaria


"Returning the value" wrote:

"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.

"

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Returning the value

'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
---------------
Jacob Skaria


"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"Returning the value" wrote:

"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.

"

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF not returning anything ashish128 Excel Discussion (Misc queries) 2 November 6th 07 10:28 AM
Returning #N/A Rao Ratan Singh Excel Discussion (Misc queries) 5 January 25th 07 05:23 AM
Sum returning 0 JR Excel Worksheet Functions 4 February 24th 06 01:41 PM
Returning a 0 Value Steved Excel Worksheet Functions 3 July 29th 05 02:44 AM
Need some help returning a value rcarrollct Excel Worksheet Functions 2 July 6th 05 11:36 PM


All times are GMT +1. The time now is 08:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"