How to bring down row without zero value

Zubair

Active Member
Joined
Jul 4, 2009
Messages
304
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I need formula to bring next row information if value is zero.

Like from the below example, D13 is zero, in the month of Feb I want B14 and D14 in Cell B27 and C27.

I have a list of 1000 products so not able to link each cell. please help

Book1
BCD
2ProductJanFeb
3A200120
4B10089
5C89200
6D95
7E150150
8
9Rank
10A13
11B34
12C51
13D4 
14E22
15
16Jan
17A1
18B3
19C5
20D4
21E2
22
23Feb
24A3
25B4
26C1
27E2
Sheet1
Cell Formulas
RangeFormula
C10:C14C10=IF(C3=0,"",RANK(C3,$C$3:$C$7,0))
D10:D14D10=IF(D3=0,"",RANK(D3,$D$3:$D$7,0))
C17:C21C17=C10
C24:C26C24=D10
C27C27=D14
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Do you mean D6 is zero?
but what is your objective? are you trying to rank the products of each month?
 
Upvote 0
Do you mean D6 is zero?
but what is your objective? are you trying to rank the products of each month?
Let me rephrase it again

Need formula in Output area to bring data from A2:B6 with excluding row with blank in B2:B6.



Mr. Excel.xlsm
AB
1InputFeb
2A3
3B4
4C1
5D
6E2
7
8
9Output
10A3
11B4
12C1
13E2
Sheet4
 
Upvote 0
Okay. do you want formulas that return blanks in row 14. If not, then office 365 function FILTER is what I would do, but you do not have that.
But, you do have Power Query which you can filter your data and then return it. Although I'm not sure of your ultimate objective so I don't know if that would work for you or not. Have you explored Power Query?
 
Upvote 0
Okay. do you want formulas that return blanks in row 14. If not, then office 365 function FILTER is what I would do, but you do not have that.
But, you do have Power Query which you can filter your data and then return it. Although I'm not sure of your ultimate objective so I don't know if that would work for you or not. Have you explored Power Query?
I am using very simple excel I don't know advance level of excel, so not explored PQ.

What currently I am doing applying link with cell to bring data but I have 1000 more lines and want any formula
 
Upvote 0
Try this

23 03 11.xlsm
AB
1InputFeb
2A3
3B4
4C1
5D
6E2
7
8
9Output
10A3
11B4
12C1
13E2
14  
Zubair
Cell Formulas
RangeFormula
A10:B14A10=IFERROR(INDEX(A$2:A$6,AGGREGATE(15,6,(ROW(A$2:A$6)-ROW(A$2)+1)/($B$2:$B$6<>""),ROWS(A$10:A10))),"")
 
Upvote 1
Solution
Try this

23 03 11.xlsm
AB
1InputFeb
2A3
3B4
4C1
5D
6E2
7
8
9Output
10A3
11B4
12C1
13E2
14  
Zubair
Cell Formulas
RangeFormula
A10:B14A10=IFERROR(INDEX(A$2:A$6,AGGREGATE(15,6,(ROW(A$2:A$6)-ROW(A$2)+1)/($B$2:$B$6<>""),ROWS(A$10:A10))),"")
Clapping!!!

Many thanks Peter its exactly what I needed.
 
Upvote 0
You're welcome. Thanks for the confirmation. :)
Apologies for asking addition in formula,

Can we add ranking based on value (column B) on descending order in the same formula please?

Like shown below

Mr. Excel.xlsm
AB
10B4
11A3
12E2
13C1
Bring data excluding zero value
 
Upvote 0
Will the values in column B always be different to each other or could there be ties?
 
Upvote 0

Forum statistics

Threads
1,223,632
Messages
6,173,467
Members
452,516
Latest member
archcalx

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