Hi Paul, Sorry, if my question is vague.
I would like VBA to perform the test and enter the result. Thanks. DanJ On Wednesday, September 10, 2014 7:24:49 PM UTC+8, Paul Schreiner wrote: > > Are you saying that: > 1) you'd like to use VBA to insert the =IF() statement? > 2) or that you'd like VBA to perform the test and enter the result? > 3) or that you'd like a VBA function to perform the test and return > the result? > > *Paul* > ----------------------------------------- > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > ----------------------------------------- > > *From:* 'DanJ' via MS EXCEL AND VBA MACROS <excel-...@googlegroups.com > <javascript:>> > *To:* excel-...@googlegroups.com <javascript:> > *Sent:* Wednesday, September 10, 2014 2:35 AM > *Subject:* $$Excel-Macros$$ Convert IF formula to VBA > > Dear Everyone, > > I want to categorize age of receivables based on the number of days due > using the formula below. The formula is in cell B2. > > > =IF(A2>=180,"181 days up",IF(A2>90,"91-180 days",IF(A2>60,"61-90 > days",IF(A2>30,"31 to 60 days",IF(A2>0,"1 to 30 > days",IF(A2<=0,"Current")))))) > > > How do I convert said formula to VBA and populate the same to the next > succeeding rows. > > > Thank you in advance for your help. > > > DanJ > > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros...@googlegroups.com <javascript:>. > To post to this group, send email to excel-...@googlegroups.com > <javascript:>. > Visit this group at http://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > > > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.