Re: $$Excel-Macros$$ Convert IF formula to VBA

2014-09-11 Thread 'DanJ' via MS EXCEL AND VBA MACROS
Hi Paul,

Got it! Idea taken from the Code sent by Bill.

Here's my code and it works perfectly fine for my need.


Sub AgingofReceivables()
 
Application.ScreenUpdating = False
 
ActiveSheet.range("A2").Select

Do While ActiveCell.value <> "" 'checking if the cell is not blank

If ActiveCell.value <= 0 Then ActiveCell.Offset(0, 1).value = 
"Current"
If ActiveCell.value > 0 Then ActiveCell.Offset(0, 1).value = "1 to 
30 days"
If ActiveCell.value > 30 Then ActiveCell.Offset(0, 1).value = "31 
to 60 days"
If ActiveCell.value > 60 Then ActiveCell.Offset(0, 1).value = 
"61-90 days"
If ActiveCell.value > 90 Then ActiveCell.Offset(0, 1).value = 
"91-180 days"
If ActiveCell.value > 180 Then ActiveCell.Offset(0, 1).value = "181 
days up"

ActiveCell.Select 'goes back to A2
ActiveCell.Offset(1, 0).Select ' goes to the next row
Loop

Application.ScreenUpdating = True

End Sub

Thank you again!

Best regards,

DanJ




On Thursday, September 11, 2014 8:52:35 PM UTC+8, Paul Schreiner wrote:
>
> No problem, once you've asked and answered a couple hundred questions 
> you'll get an idea of what part of what is in your head needs to be shared 
> to get the answer you're looking for!
>  
> It looks like Mr. Bill has provided a Change_Event macro that could work 
> for what you want to do.
>  
> In case you're not familiar, there are several ways a VBA macro can be 
> "invoked".
>  
> You can use the Macros icon in the developer tab and select your macro.
>  
> You can create a button.
>  
> You can write the macro as a public function. This is also referred to as 
> a "User Defined Function" (UDF).
> you would then be able to insert a formula in a cell like:
> =TestVal(A2) and have it return the test result.
>  
> Or you can, as Mr. Bill provided, create a macro that executes whenever a 
> change is made to a sheet.
> His macro tests to see if the cell changed is cell "A2",
> then evaluates the cell value.
>  
> It depends upon not only what you want to do, but how you  want to do it.
>  
> Once again, in your mind you have a "vision" or concept of how you want 
> something to work.
> The more you of that vision you can share, the closer the answer will be 
> to what you were trying to accomplish.
>  
> Otherwise, the missing information relies on assumptions made by the mind 
> of others. Which, in some cases can be an adventure in itself!
>  
> let us know if you need additional assistance.
>  
> *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  >
> *To:* excel-...@googlegroups.com  
> *Cc:* schrein...@att.net  
> *Sent:* Wednesday, September 10, 2014 10:38 PM
> *Subject:* Re: $$Excel-Macros$$ Convert IF formula to VBA
>  
> 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  >
> *To:* excel-...@googlegroups.com 
> *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 

Re: $$Excel-Macros$$ Convert IF formula to VBA

2014-09-11 Thread Paul Schreiner
No problem, once you've asked and answered a couple hundred questions you'll 
get an idea of what part of what is in your head needs to be shared to get the 
answer you're looking for!
 
It looks like Mr. Bill has provided a Change_Event macro that could work for 
what you want to do.
 
In case you're not familiar, there are several ways a VBA macro can be 
"invoked".
 
You can use the Macros icon in the developer tab and select your macro.
 
You can create a button.
 
You can write the macro as a public function. This is also referred to as a 
"User Defined Function" (UDF).
you would then be able to insert a formula in a cell like:
=TestVal(A2) and have it return the test result.
 
Or you can, as Mr. Bill provided, create a macro that executes whenever a 
change is made to a sheet.
His macro tests to see if the cell changed is cell "A2",
then evaluates the cell value.
 
It depends upon not only what you want to do, but how you  want to do it.
 
Once again, in your mind you have a "vision" or concept of how you want 
something to work.
The more you of that vision you can share, the closer the answer will be to 
what you were trying to accomplish.
 
Otherwise, the missing information relies on assumptions made by the mind of 
others. Which, in some cases can be an adventure in itself!
 
let us know if you need additional assistance.

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 
>To: excel-macros@googlegroups.com 
>Cc: schreiner_p...@att.net 
>Sent: Wednesday, September 10, 2014 10:38 PM
>Subject: Re: $$Excel-Macros$$ Convert IF formula to VBA
>  
>
>
>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 
>>>To: excel-...@googlegroups.com 
>>>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 r

Re: $$Excel-Macros$$ Convert IF formula to VBA

2014-09-10 Thread Mr_Bill
If I understood you correctly this might work for you

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Days As Integer, result As String
If Target.Address = "$A$2" Then
Days = Range("A2").Value
If Days >= 180 Then
result = "181 days up"
ElseIf Days > 90 Then
result = "91-180 days"
ElseIf Days > 60 Then
result = "61-90 days"
ElseIf Days > 30 Then
result = "31-60 days"
ElseIf Days > 0 Then
result = "1-30 days"
ElseIf Days <= 0 Then
result = "Current"
End If
Range("B1").Value = result
End If
End Sub

Just put that in the sheet that A2 is in

On Wednesday, September 10, 2014 7:40:21 PM UTC-7, DanJ wrote:
>
> Hi,
>
> I would like VBA to perform the test and enter the result.
>
>
> 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 > >
>> *To:* excel-...@googlegroups.com 
>> *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.
>> To post to this group, send email to excel-...@googlegroups.com.
>> 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.


Re: $$Excel-Macros$$ Convert IF formula to VBA

2014-09-10 Thread 'DanJ' via MS EXCEL AND VBA MACROS
Hi,

I would like VBA to perform the test and enter the result.


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  >
> *To:* excel-...@googlegroups.com  
> *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 .
> To post to this group, send email to excel-...@googlegroups.com 
> .
> 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.


Re: $$Excel-Macros$$ Convert IF formula to VBA

2014-09-10 Thread 'DanJ' via MS EXCEL AND VBA MACROS
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  >
> *To:* excel-...@googlegroups.com  
> *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 .
> To post to this group, send email to excel-...@googlegroups.com 
> .
> 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.


Re: $$Excel-Macros$$ Convert IF formula to VBA

2014-09-10 Thread Paul Schreiner
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 
>To: excel-macros@googlegroups.com 
>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+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.
>
>
>

-- 
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.


Re: $$Excel-Macros$$ Convert IF formula to VBA

2014-09-10 Thread Vaibhav Joshi
Hi

You can use fill down method to copy formula to succeeding rows..

Cheers!!

+
*I did not do this for you. God is here working through me for you.*

On Wed, Sep 10, 2014 at 12:05 PM, 'DanJ' via MS EXCEL AND VBA MACROS <
excel-macros@googlegroups.com> wrote:

> 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+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.
>

-- 
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.


$$Excel-Macros$$ Convert IF formula to VBA

2014-09-09 Thread 'DanJ' via MS EXCEL AND VBA MACROS
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+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.