VBA Code to transfer cell format without copy paste

bala ram 1 Reputation point
2021-06-07T04:56:00.34+00:00

I am trying to apply cell format of Column(4) to other column in excel table without using copy paste option.

I am expecting code like below to transfer cell format
Range("B1:B5").Value = Range("A1:A5").Value

I tried the below code but it throws error
.ListObjects(1).Range.Resize(Rng.Rows.Count, 1).Cells.Format = .ListObjects(2).Range.Columns(4).Format

I really appreciate your quick help

Office Visual Basic for Applications
Office Visual Basic for Applications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Visual Basic for Applications: An implementation of Visual Basic that is built into Microsoft products.
1,506 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.