Modificación de Macro

Buenas tardes tengo una duda como puedo hacer que los importes que están en las celdas H y V los que tengan valor los redonde a 0 y que no ponga | ala celdas A, B, F y G ya que tienen formulas y las considera un no tengan valores, necesito que si no tiene valores no ponga |
Lines = Application.WorksheetFunction.CountA(Range("a5:a65536"))
Lines = Lines + 4
'catalogo de valores
For x = 3 To Lines
A = Left(Cells(x, 1), 2) & "|"
B = Left(Cells(x, 2), 2) & "|"
C = Cells(x, 3) & "|"
D = Cells(x, 4) & "|"
E = Cells(x, 5) & "|"
F = Right(Cells(x, 6), 2) & "|"
G = Cells(x, 7) & "|"
H = Cells(x, 8) & "|"
I = Cells(x, 9) & "|"
J = Cells(x, 10) & "|"
K = Cells(x, 11) & "|"
L = Cells(x, 12) & "|"
M = Cells(x, 13) & "|"
N = Cells(x, 14) & "|"
O = Cells(x, 15) & "|"
P = Cells(x, 16) & "|"
Q = Cells(x, 17) & "|"
R = Cells(x, 18) & "|"
S = Cells(x, 19) & "|"
T = Cells(x, 20) & "|"
U = Cells(x, 21) & "|"
V = Cells(x, 22) & "|"
'CONCATENA DATOS
Cells(x, 28) = A & B & C & D & E & F & G & H & I & J & K & L & M & N & O & P & Q & R & S & T & U & V
Next x
'Guarda archivo
Range(Cells(3, 28), Cells(Lines, 28)).Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
direc = Application.GetSaveAsFilename(InitialFileName:="DEVIVA", _
fileFilter:="archivos de texto (*.txt), *.txt", Title:="Guardar archivo Carga-Batch Como:")
ActiveWorkbook.SaveAs Filename:= _
direc, FileFormat:= _
xlTextPrinter, CreateBackup:=False
ActiveWindow.Close savechanges:=False
Selection.ClearContents
Range("F5").Select
End Sub

Añade tu respuesta

Haz clic para o