Forum Discussion

Santhosh_V's avatar
Santhosh_V
Copper Contributor
Jul 01, 2021
Solved

Need VBA code to get the data from another excel and use few formula, write the output back to excel

Hi All,

 

I have a monthly data in a  excel workbook named as workbook1, need a VBA code, put it into a button and placed in workbook 2. And by using the code to get the data of one column (named as A) from the  Workbook 1 and use some formula , then write the output back to the workbook1 into a column (named as B)

 

Formula that was using in this scenario : =TEXTJOIN(", ",TRUE,IF(ISNUMBER(SEARCH({"Generic Mailbox","Distribution","Non-standard","NSSR","CASL Block","Virtual phone ","unsatisified"},A1)),{"Shared Mailbox","DL ","NSSR Request","NSSR Request","O365 block List","Vioce Mail ","Unsatisfied Requests"},""))

 

I have tried but it not accomplish the goals. So Anyone could help on this issue.

 

HansVogelaar, If possible could you look into this scenario.

 

Thank you.

 

  • Santhosh_V 

    I did what you asked, but I already suspected that it wasn't what you wanted.

    Remove the lines

            ' Optional
            ws2.Range("A2:A" & lr).Value = .Value

    from the code.

6 Replies

Resources