Deletion of zeros (0)

anthonymedz

Board Regular
Joined
Jan 30, 2015
Messages
69
Hi all,

Good day.
Can anyone would help me on how to delete all zeros(0) and put in place the value in one column.

Example:

A B C D E A
9 0 0 0 0 9
0 10 0 0 0 10
0 0 49 0 0 ==result==> 49
0 0 0 400 0 400
0 0 0 0 100 100
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try the following in a copy of your workbook.

Code:
Sub RemoveThem()
  With Range("A1").CurrentRegion
    .Replace What:=0, Replacement:="", LookAt:=xlWhole, SearchFormat:=False, ReplaceFormat:=False
    On Error Resume Next
    .SpecialCells(xlBlanks).Delete Shift:=xlToLeft
    On Error GoTo 0
  End With
End Sub
 
Upvote 0
Hi Peter,

Good day.
Can you help me again. I would like to have is to Copy the value from the other sheet and paste it in different sheet without overlapping the value on each column. For example I paste the value in column "A1", the 2nd that i would paste is in "B1" or "C1"......."Z1" without overlapping the value in each Column "A1" to "Z1".

Thank you for the advance help.
 
Upvote 0
If this is a different question, then you would be best to start a new thread.

In any case I do not understand what you are asking. So,

- if a new question then start a new thread and explain more fully & clearly, perhaps with examples.

- if this is related to the original question in this thread then you will still need to explain more fully & clearly, perhaps with examples.
 
Upvote 0
- if this is related to the original question in this thread then you will still need to explain more fully & clearly, perhaps with examples.
I think it is related... it sounds to me like the OP wants you to take the output from your macro (Column A values) and Transpose them into Row 1 on some different sheet.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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