Updating formula to sort and exclude zero values

kimparker0261

New Member
Joined
Jan 8, 2019
Messages
30
For the formula below do you know of any way formula could be updated so that the sheet can automatic sort by the qty so the zeros or blanks rows would not be shown


=IF(OR(G13="",Input!G13<=0),"",Input!H13)
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
you can't sort or filter by formula.
Can only be done either manually or by VBA.
 
Upvote 0
You can use the macro recorder to do this, then if you have any further problems post the recorded code back here !
What column do you want to sort by ??
 
Upvote 0
This is a vba code that is written to delete rows, however I need the code to delete rows 1 to 30 if the value in column g is 0, Can someone help me to update the code.


Sub sbDelete_Rows_Based_On_Criteria()
Dim lRow As Long
Dim iCntr As Long
lRow = 20
For iCntr = lRow To 1 Step -1
If Cells(iCntr, 1) = 10 Then
Rows(iCntr).Delete
End If
Next
End Sub
 
Upvote 0
Try

Code:
Sub sbDelete_Rows_Based_On_Criteria()
Dim lRow As Long
Dim iCntr As Long
lRow = 30
For iCntr = lRow To 1 Step -1
If Cells(iCntr, 1) = 0 Then
Rows(iCntr).Delete
End If
Next
End Sub
 
Upvote 0
Cross posted https://www.excelforum.com/excel-programming-vba-macros/1260573-delete-rows-per-value-in-vba.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
You do not need to delete either of them.
All you need to do in future is to let us know you have done it & supply a link.
I would suggest that you add a link on the other forum to this post, before the mods on that board find out.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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