SOLVED

VBA

Iron Contributor

Hello Everyone,

How to show header in different columns with the help of VBA code?

 

like :

Screenshot (5943).png

 

 

Please help..??

2 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution

@Excel 

Sub Add_headers()

With Sheets("Tabelle1")

.Range("A1:E1").Value = Array("Region", "Expenses", "January", "February", "March")

End With

End Sub

 

Maybe with above code if sheetname is "Tabelle1".

It works.
Thank you so much sir.
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@Excel 

Sub Add_headers()

With Sheets("Tabelle1")

.Range("A1:E1").Value = Array("Region", "Expenses", "January", "February", "March")

End With

End Sub

 

Maybe with above code if sheetname is "Tabelle1".

View solution in original post