Hi,
I have the following numbers
A1=5, B1=15, C1=7, D1=32, E1=23
I need to find the nearest biggest number of A1, in this case the result would be '7'.
Please guide me using formula instead of macro.
Thank you so much.
Hi,
I have the following numbers
A1=5, B1=15, C1=7, D1=32, E1=23
I need to find the nearest biggest number of A1, in this case the result would be '7'.
Please guide me using formula instead of macro.
Thank you so much.
hi gan_xl. try:
=MIN(INDEX((B1:E1>=A1)*B1:E1,))
Edit: nah, that won't work
=SMALL(INDEX((B1:E1>=A1)*B1:E1,),1+COUNTIF(B1:E1,"<"&A1))
Last edited by benishiryo; 10-10-2013 at 06:59 AM.
Thanks, if you have clicked on the * and added our rep.
If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".
"Contentment is not the fulfillment of what you want, but the realization of what you already have."
Tips & Tutorials I Compiled | How to Get Quick & Good Answers
=MIN(IF(B1:E1>A1,B1:E1,10000))
as an array formula (confirm with ctrl+shift+enter)
You can use the following array formula Ctrl Shift Enter
=SMALL(MIN(IF($B$1:$E$1>A1,$B$1:$E$1)),1)
Excel Guru in the making
<----------If the question has been answered to your satisfication please click the Add Repuation star to the left
array formula (Ctrl +Shift+Enter)
{=A1+MIN(IF($A$1:$E$1>A1,$A$1:$E$1-A1))}
try another valuel and see the result
Thanks all. it works great.
Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED",as per our Forum Rule #9. I will do it for you this time.
In future, to mark your thread as Solved, you can do the following -
Select Thread Tools-> Mark thread as Solved.
Incase your issue is not solved, you can undo it as follows -
Select Thread Tools-> Mark thread as Unsolved.
Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks