If no value, jump to next one

viktor_david

New Member
Joined
Mar 16, 2017
Messages
29
Hi,

I want to create a formula that brings up a certain value only if this is there, if not, jump to next cell.
Basically like this:
A shows the return values for a customer
Formula shows only the returns for this customer. (assume it is in another workbook)

AFORMULA
1-5.5-5.5
277
3-12
4-1
512
6-
7-
8-
91

<tbody>
</tbody>


PLease Help
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
in B1
=IFERROR(INDEX($A$1:$A$1000,SMALL(IF(($A$1:$A$1000<>""),ROW($A$1:$A$1000)),ROW(A1)),1),"")
Array formula, use Ctrl-Shift-Enter
and copy down column B
 
Upvote 0
If you have no headers
This is an array formula and must be committed with CONTROL+SHIFT+ENTER. If done correctly Excel will put {} around the formula.
Code:
=IF(ROWS(A$1:A1)<=COUNTIF($A$1:$A$9,"<>0"),INDEX($A$1:$A$9,SMALL(IF($A$1:$A$9<>0,ROW($A$1:$A$9)),ROWS($A$1:A1))),"")

If you have headers in row one. Also must be entered with CONTROL+SHIFT+ENTER
Code:
=IF(ROWS(A$2:A2)<=COUNTIF($A$2:$A$10,"<>0"),INDEX($A$2:$A$10,SMALL(IF($A$2:$A$10<>0,ROW($A$2:$A$10)-ROW($A$2)+1),ROWS($A$2:A2))),"")
 
Upvote 0
If you have no headers
This is an array formula and must be committed with CONTROL+SHIFT+ENTER. If done correctly Excel will put {} around the formula.
Code:
=IF(ROWS(A$1:A1)<=COUNTIF($A$1:$A$9,"<>0"),INDEX($A$1:$A$9,SMALL(IF($A$1:$A$9<>0,ROW($A$1:$A$9)),ROWS($A$1:A1))),"")

If you have headers in row one. Also must be entered with CONTROL+SHIFT+ENTER
Code:
=IF(ROWS(A$2:A2)<=COUNTIF($A$2:$A$10,"<>0"),INDEX($A$2:$A$10,SMALL(IF($A$2:$A$10<>0,ROW($A$2:$A$10)-ROW($A$2)+1),ROWS($A$2:A2))),"")

This is perfect answer... Same as above.
Now, I am getting those numbers from another worksheet, instead of A1:A9 it'll be Trades!A1:A9, for example...

When i plug this formula, it only takes a few numbers, not all of them.. what can I do now?
 
Upvote 0
in B1
=IFERROR(INDEX($A$1:$A$1000,SMALL(IF(($A$1:$A$1000<>""),ROW($A$1:$A$1000)),ROW(A1)),1),"")
Array formula, use Ctrl-Shift-Enter
and copy down column B

Thanks a lot for your answer. It works perfectly.

Please, see my answer above for the following challenge, please

THanks a lot
 
Upvote 0
Try

=IFERROR(INDEX(Trades!$A$1:$A$1000,SMALL(IF((Trades!$A$1:$A$1000<>""),ROW($A$1:$A$1000)),ROW(A1)),1),"")

To be honest the description of your problem should describe the problem and data EXACTLY AS IT IS.
You shouldn't post a problem saying "Here's my problem and this is my data" then several posts later "Well actually, my data is a bit different to that"
It means we have to spend more time on a solution that works AS YOU ORIGINALLY EXPLAINED IT.
 
Upvote 0
Try

=IFERROR(INDEX(Trades!$A$1:$A$1000,SMALL(IF((Trades!$A$1:$A$1000<>""),ROW($A$1:$A$1000)),ROW(A1)),1),"")

To be honest the description of your problem should describe the problem and data EXACTLY AS IT IS.
You shouldn't post a problem saying "Here's my problem and this is my data" then several posts later "Well actually, my data is a bit different to that"
It means we have to spend more time on a solution that works AS YOU ORIGINALLY EXPLAINED IT.


Yes, guys. you are right. I am sorry for that
I am very thankful for your input, all of you.
I did manage to fix it and it all looks fine now.
I will contact you if anything else but this is a f-ing nice site with wise ppl.

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,635
Messages
6,125,945
Members
449,275
Latest member
jacob_mcbride

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