xxx1 Hello, I am trying to write a macro which automatically uses formulas accor
ID: 3562538 • Letter: X
Question
xxx1
Hello, I am trying to write a macro which automatically uses formulas according to actual month.
What I have till now is a macro that recognizes actual month by using formula SheetName. (Macro will be running from activesheet, which is named by months)
For example:
Sheet name: September > use =IF(F18="July, 2014",VLOOKUP(C18,'B&S July'!$A$18:$G$101,6,FALSE),IF(F18="August, 2014",VLOOKUP(C18,'B&S August'!$A$18:$G$173,6,FALSE),H18))
Sheet name: October > use =IF(F18="July, 2014",VLOOKUP(C18,'B&S July'!$A$18:$G$101,6,FALSE),IF(F18="August, 2014",VLOOKUP(C18,'B&S August'!$A$18:$G$173,6,FALSE),IF(F18="September, 2014",VLOOKUP(C18,'B&S September'!$A$18:$G$173,6,FALSE),H18)))
Help me!!, im stuck#@~
Explanation / Answer
Use this formula, It will take care your all sheets.
Ensure your sheet names are complete month name.
=IFERROR(VLOOKUP(C18,INDIRECT("'B&S "&LEFT(F18,FIND(",",F18)-1)&"'!$A$18:$G$1000"),6,FALSE),H18)
Hope it helps! :-)
Regards,
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.