Hi Everyone, I'm having troubles with this formula. It currently works. But I would like to extend the range out to column CE. There are 2 problems:
1). I would like to wrap the text of this formula so that it appears as 4 lines in the vba editor. It's too hard to read as 1 gigantic line. 2). I would like to make the if statement go out to column CE and I can't seem to make it work beyond column AY. Can someone please help? WS3.Cells(iRow, 11).Formula = "=IF(NAMES!AR" & j & "<>"""",NAMES!AR1,IF (NAMES!AS" & j & "<>"""",NAMES!AS1,IF(NAMES!AT" & j & "<>"""",NAMES! AT1,IF(NAMES!AU" & j & "<>"""",NAMES!AU1,IF(NAMES!AV" & j & "<>"""",NAMES!AV1,IF(NAMES!AW" & j & "<>"""",NAMES!AW1,IF(NAMES!AX" & j & "<>"""",NAMES!AX1,IF(NAMES!AY" & j & "<>"""",NAMES! AY1,""""))))))))" --~--~---------~--~----~------------~-------~--~----~ ---------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,500 subscribers worldwide and receive many nice notes about the learning and support from the group. Our goal is to have 10,000 subscribers by the end of 2009. Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe -~----------~----~----~----~------~----~------~--~---