Forum

Notifications
Clear all

Changing colums

2 Posts
2 Users
0 Reactions
67 Views
(@bethdevilla)
Posts: 1
New Member
Topic starter
 

Hi,

 

Please help. I'am trying to automate my report using macro. The problem is the columns are not constant. 

This week, I need the data on column M but next week it's already in column N, then the week after it's either back in column M or still on column N, etc. What is just constant is the column name. I am trying to apply by searching the name first and copy that column but still it doesn't work. 

Here is an example by using the recording macro.

Cells.Find(What:="fbaperunitfulfillmentfee", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
Cells.FindNext(After:=ActiveCell).Activate
Columns("U:U").Select

 

Thank you,

Beth

 
Posted : 10/07/2021 3:18 am
(@debaser)
Posts: 836
Member Moderator
 

Your first find will either locate the correct column, or fail if the value isn't present. I don't see any code to copy and the rest of the code doesn't relate to your question as far as I can see, so perhaps you could clarify what the issue actually is?

 
Posted : 10/07/2021 7:07 am
Share: