Macro to format cells

[Closed]
Report
Posts
1
Registration date
Monday March 7, 2011
Status
Member
Last seen
March 7, 2011
-
Posts
2807
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
September 21, 2021
-
Hello,
I hava excel data exported from a community page whihc will look like

ttetetert -Row 1
yyyyyy Row 2
a b c d e f g h i j k l m N o p q r s t u v w x y z aa
I want to delete those two rows and move the colomn w x y before coloumn f and delete z and aa coloumn
Also format the whole excel with airal and font size 8

I just started working with excel and im new to macros so please help me with this i have to do this every week .. Would be better if anybody help with this


1 reply

Posts
2807
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
September 21, 2021
482
Hi Raji85,

Try recording a macro and see if that works for you.

First save your file.

Hit the record button (top menu > extra > macro > record macro) make all the actions you want, stop recording.
Open VBE (alt+F11), look for module1, copy code, reload file, paste code in VBE, run code and see if you get the desired result.

Post back, if you get suck somewhere.

Best regards,
Trowa