Need additional macro code

Hi,

I required additional code for my macro. My macro is attached with this.

For your information let me tell you that I first input data starting from cell C57 and cell D57.in tab B. In tab C I first give range in column A and column I give table name to the selected range in both the columns and then input the data in W58 and X58 for comparison. And then I run both the macros. I want this task to be done by additional macro code and also want to combine both the macros in one macro.

Additional code require this to do:

In “All Media” tab if file name is,

AAA then B12=C12=D12 should be equal to 31360
BBB then B12=C12=D12 should be equal to 39700
CCC then B12=C12=D12 should be equal to 8340
DDD then B12=C12=D12 should be equal to 1011

, if not then it should display a message “QC Failed” when entire macro is finished.

If it is same then go to “B” Tab.

For B tab macro is set up, just need additional code which is if in C and D column if there is any FALSE then it should highlight it as “RED” cell.

Move to tab C.

In this first it should select range from cell A58 to down (It may be different in many files may be till A63 or A110) and with this selected range give this table name as A. Simillarly for I58 cell, if you look at A58-A63 and B58-B63 then you will have this idea. After this it should continue with the existing code and cell starting from Y58 and Z58 if there is any #N/A then it should highlight entire cell with red.

I have about 500 files in which this QC required, so I would just open this macro and will open my files one by one run the macro and QC it. I hope I am clear. Please first run both the macros in attached file for your understanding.

Please help me this is very urgent. I would appreciate for any help.

Thanks,

Keyur

AttachmentSize
AAA.xls44 KB
Vishesh's picture

Hi Keyur, I have read your

Hi Keyur,

I have read your post and I think this should be the logic of your macro.

On running the macro it should ask for a folder path (where all your 500 files are kept). On choosing the folder it should then open files one by one; run all the macros for the 3 sheets; save the files. This would then be the matter of few clicks.

However, this is a bit involved for the forum.

Happy to help via our consultancy
http://excelexperts.com/contact