Anandpersad
New Member
- Joined
- Oct 18, 2014
- Messages
- 31
Hi All,
</SPAN></SPAN>
I have a VBA which checks which columns I need. The ones I do not need are deleted.</SPAN></SPAN>
From the remaining columns I need to change the column header. </SPAN></SPAN>
I have a VBA which does that. So far so good.</SPAN></SPAN>
But what I am looking for , is VBA which will find the particular header name and change it to the new name. If found than change, if not found go to the next search to change.</SPAN></SPAN>
If not found a pop up message should appear with the header name which was not found.</SPAN></SPAN>
And so on till last column is found and changed or not found and a message pops up.</SPAN></SPAN>
I am using the following VBA</SPAN></SPAN>
Dim Found As Range</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Concernno", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Concern/Ultimate parent ID"</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Name", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Concern/Ultimate parent name"</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Holdingno", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Holding/parent ID"</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Name", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Holding/parent name"</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Clientno", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Client ID"</SPAN></SPAN>
Thanks in Advance</SPAN></SPAN>
Anandpersad</SPAN></SPAN>
</SPAN></SPAN>
I have a VBA which checks which columns I need. The ones I do not need are deleted.</SPAN></SPAN>
From the remaining columns I need to change the column header. </SPAN></SPAN>
I have a VBA which does that. So far so good.</SPAN></SPAN>
But what I am looking for , is VBA which will find the particular header name and change it to the new name. If found than change, if not found go to the next search to change.</SPAN></SPAN>
If not found a pop up message should appear with the header name which was not found.</SPAN></SPAN>
And so on till last column is found and changed or not found and a message pops up.</SPAN></SPAN>
I am using the following VBA</SPAN></SPAN>
Dim Found As Range</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Concernno", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Concern/Ultimate parent ID"</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Name", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Concern/Ultimate parent name"</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Holdingno", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Holding/parent ID"</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Name", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Holding/parent name"</SPAN></SPAN>
Set Found = Rows(1).Find(What:="Clientno", LookIn:=xlValues, lookat:=xlWhole)</SPAN></SPAN>
If Found Is Nothing Then Exit Sub</SPAN></SPAN>
Found.Value = "Client ID"</SPAN></SPAN>
Thanks in Advance</SPAN></SPAN>
Anandpersad</SPAN></SPAN>