Formula to skip a certain value and continue on the sequence

Fantoi

New Member
Joined
Oct 3, 2017
Messages
6
Hi everyone!

First time reaching out for help, I have a sequence in column A and would like to pull the data into column B. But the thing is I would like to skip over the cell if it states "All Other" yet continue on the same sequence. I remember writing a formula a while ago for this, had some nested If statements, but cant seem to recall it now.. Please help!


OriginalWhat I Need
Apple
=IF(A7="All Other",A8,A7)....?Apple
HPHP
SamsungSamsung
All OtherSony
SonyDell
DellLG
LGVizio
VizioCanon
CanonLenovo
Lenovo

<tbody>
</tbody>
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Re: Need a formula to skip a certain value and continue on the sequence

If your original is in A2:A11
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($C$2:C2)>=COUNTIF(A2:A11,"<>all other"),"",INDEX($A$2:$A$11,SMALL(IF($A$2:$A$11<>"all other",ROW($A$2:$A$11)-ROW($A$2)+1),ROWS($C$2:C2))))
 
Upvote 0
Re: Need a formula to skip a certain value and continue on the sequence

Thanks for replying!

Original is in A2:A11, When C&P-ing your formula into C2 and dragging it down to C10, I am returning a #NUM !
 
Upvote 0
Re: Need a formula to skip a certain value and continue on the sequence

I'm sorry didn't read through the bolded part... that it was an array formula! IT WORKS THANKS!
 
Upvote 0
Formula to skip two certain values and continue on the sequence

Hi Everyone,

I have a sequence in column A and would like to pull the data into column B. But the thing is I would like to skip over the cell if it states "All Other Brands" or "Private Label"yet continue on the same sequence. I remember writing a formula a while ago for this, had some nested If statements, but cant seem to recall it now.. Please help!

Please see example down below for reference, thanks!

RankOriginalWhat I need
1AppleApple1
2HPHP2
3SamsungSamsung3
4All Other BrandsSKIPSony4
5SonyDell5
6Private LabelSKIPLG6
7DellVizio7
8LGCanon8
9VizioLenovo9
10Canon
11Lenovo

<tbody>
</tbody>


<tbody>
</tbody>
 
Upvote 0
Re: Formula to skip two certain values and continue on the sequence


Book1
ABCDE
1RankOriginalWhat I need
21AppleApple1
32HPHP2
43SamsungSamsung3
54All Other BrandsSony4
65SonyDell5
76Private LabelLG6
87DellVizio7
98LGCanon8
109VizioLenovo9
1110Canon
1211Lenovo
Sheet1
Cell Formulas
RangeFormula
D2{=IFERROR(INDEX($B$2:$B$12,SMALL(IF($B$2:$B$12<>"All Other Brands",IF($B$2:$B$12<>"Private Label",ROW($B$2:$B$12)-ROW($B$1))),ROWS($D$2:$D2))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0
Re: Need a formula to skip a certain value and continue on the sequence

So that others that may have the same question can see this I am responding to your PM here. To skip Both "All others" and " private label" you can modify the original formula to the below.


Excel 2010
A
B
C
D
1
Original
List
2
1
Apple
Apple
3
2
HP
HP
4
3
Samsung
Samsung
5
4
All Other
Sony
6
5
Sony
Dell
7
6
Private label
LG
8
7
Dell
Vizio
9
8
LG
Canon
10
9
Vizio
Lenovo
11
10
Canon
12
11
Lenovo

<tbody>
</tbody>
Sheet5
Copy the formula down

Array Formulas
Cell
Formula
D2
{=IF(ROWS($D$2:D2)>COUNTIFS($B$2:$B$12,"<>all other",$B$2:$B$12,"<>Private label"),"",INDEX($B$2:$B$12,SMALL(IF($B$2:$B$12<>"all other",IF($B$2:$B$12<>"private label",ROW($B$2:$B$12)-ROW($B$2)+1)),ROWS($D$2:D2))))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
Re: Need a formula to skip a certain value and continue on the sequence

I have merged your two threads together. Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

Also please note rule 4, as it pertains to requesting assistance via Private Messaging.
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,849
Members
449,096
Latest member
Erald

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