Re: $$Excel-Macros$$ Help needed to create a function within a macro
Hi all, thank you all for your help and time that you spend to solve this problem! I am very happy with the solution that Ashish attached. This solution works perfect and I am very happy with it - thank you! Unfortunately, I forgot to mention something important yesterday ... I need this functionality ONLY on the visible data of the table - not on the whole table! I have attached a modified version of the initial spreadsheet on Ashish. I have set an autofilter in row 1 and adjusted the values in column A. According to this setting the value in cell D15 should be 2, not 3. The value in D15 should always refer to the visible part of the table only! Can you think of a way to solve this additional challange? TIA BR from rainy Germany, Henning Am Dienstag, 9. Oktober 2012 19:26:30 UTC+2 schrieb ashish: see the attachment check the cells with Yellow color On Tue, Oct 9, 2012 at 8:48 PM, Swapnil Palande palande@gmail.comjavascript: wrote: Hi, Insert followibg formula in D1 cell. =if(and(or(a1=1,b1=1),c123400),3,0) Hope this is what u want. Regards swapnil, On Oct 9, 2012 6:57 PM, Henning Deschka kie...@freenet.dejavascript: wrote: Hi NG, I need to insert a function into cell D1 with an Excel2007 macro that executes the following: A B C D row 1 12343 row 21 123444 row 31 43322 row 4 34 row 51 12 row 6 432123 row 7 43234 row 81 3 row 91 3 row 10 1 The entire table has to be considered by the function (A1:C10). Each line has to be evaluated on its own, eg A1:C1. If the contents of A or B are 1 AND the value of C is 23400, then the function has succeeded. If the function succeeds, the final result of the function has to be increased by 1. In this example, the function has succeeded in the following rows: row 2 row 3 row 9 In this example, the function was executed successfully three times - so the final result of the function is 3. Can someone please help by creating a function dealing with this problem? TIA, Henning -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-...@googlegroups.comjavascript: . To unsubscribe from this group, send email to excel-macros...@googlegroups.com javascript:. -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-...@googlegroups.comjavascript: . To unsubscribe from this group, send email to excel-macros...@googlegroups.com javascript:. -- *Regards* * * *Ashish Koul* *Visit* *http://www.excelvbamacros.com/* *http://www.accessvbamacros.com/* P Before printing, think about the environment. -- Join official
Re: $$Excel-Macros$$ Help needed to create a function within a macro
Hi, Pls find attached excel. Check if it is ok with you. Regards, Swapnil. On Wed, Oct 10, 2012 at 1:41 PM, Henning Deschka kie...@freenet.de wrote: Hi all, thank you all for your help and time that you spend to solve this problem! I am very happy with the solution that Ashish attached. This solution works perfect and I am very happy with it - thank you! Unfortunately, I forgot to mention something important yesterday ... I need this functionality ONLY on the visible data of the table - not on the whole table! I have attached a modified version of the initial spreadsheet on Ashish. I have set an autofilter in row 1 and adjusted the values in column A. According to this setting the value in cell D15 should be 2, not 3. The value in D15 should always refer to the visible part of the table only! Can you think of a way to solve this additional challange? TIA BR from rainy Germany, Henning Am Dienstag, 9. Oktober 2012 19:26:30 UTC+2 schrieb ashish: see the attachment check the cells with Yellow color On Tue, Oct 9, 2012 at 8:48 PM, Swapnil Palande palande@gmail.comwrote: Hi, Insert followibg formula in D1 cell. =if(and(or(a1=1,b1=1),c1**23400),3,0) Hope this is what u want. Regards swapnil, On Oct 9, 2012 6:57 PM, Henning Deschka kie...@freenet.de wrote: Hi NG, I need to insert a function into cell D1 with an Excel2007 macro that executes the following: A B C D row 1 ** 12343 row 21** 123444 row 31 43322 row 4 ** 34 row 51 12 row 6 ** 432123 row 7 ** 43234 row 81** 3 row 91 3 row 10 1 The entire table has to be considered by the function (A1:C10). Each line has to be evaluated on its own, eg A1:C1. If the contents of A or B are 1 AND the value of C is 23400, then the function has succeeded. If the function succeeds, the final result of the function has to be increased by 1. In this example, the function has succeeded in the following rows: row 2 row 3 row 9 In this example, the function was executed successfully three times - so the final result of the function is 3. Can someone please help by creating a function dealing with this problem? TIA, Henning -- Join official facebook page of this forum @ https://www.facebook.com/** discussexcel https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-...@googlegroups.com. To unsubscribe from this group, send email to excel-macros...@** googlegroups.com. -- Join official facebook page of this forum @ https://www.facebook.com/** discussexcel https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-...@googlegroups.com. To unsubscribe from this group, send email to excel-macros...@** googlegroups.com. -- *Regards* * * *Ashish Koul* *Visit*
Re: $$Excel-Macros$$ Help needed to create a function within a macro
Hi, Here is another solution without inserting exta column Column D. Don't ask me to explain this formula, because I also don't know how it works. [?] I get this formula from net and just modified it. Following is the link from where I get it. http://www.excelforum.com/excel-formulas-and-functions/334159-sumproduct-to-calculate-visible-cells-only.html Regards, Swapnil. On Wed, Oct 10, 2012 at 4:01 PM, Swapnil Palande palande.swapni...@gmail.com wrote: Hi, Pls find attached excel. Check if it is ok with you. Regards, Swapnil. On Wed, Oct 10, 2012 at 1:41 PM, Henning Deschka kie...@freenet.dewrote: Hi all, thank you all for your help and time that you spend to solve this problem! I am very happy with the solution that Ashish attached. This solution works perfect and I am very happy with it - thank you! Unfortunately, I forgot to mention something important yesterday ... I need this functionality ONLY on the visible data of the table - not on the whole table! I have attached a modified version of the initial spreadsheet on Ashish. I have set an autofilter in row 1 and adjusted the values in column A. According to this setting the value in cell D15 should be 2, not 3. The value in D15 should always refer to the visible part of the table only! Can you think of a way to solve this additional challange? TIA BR from rainy Germany, Henning Am Dienstag, 9. Oktober 2012 19:26:30 UTC+2 schrieb ashish: see the attachment check the cells with Yellow color On Tue, Oct 9, 2012 at 8:48 PM, Swapnil Palande palande@gmail.comwrote: Hi, Insert followibg formula in D1 cell. =if(and(or(a1=1,b1=1),c1**23400),3,0) Hope this is what u want. Regards swapnil, On Oct 9, 2012 6:57 PM, Henning Deschka kie...@freenet.de wrote: Hi NG, I need to insert a function into cell D1 with an Excel2007 macro that executes the following: A B C D row 1 ** 12343 row 21** 123444 row 31 43322 row 4 ** 34 row 51 12 row 6 ** 432123 row 7 ** 43234 row 81** 3 row 91 3 row 10 1 The entire table has to be considered by the function (A1:C10). Each line has to be evaluated on its own, eg A1:C1. If the contents of A or B are 1 AND the value of C is 23400, then the function has succeeded. If the function succeeds, the final result of the function has to be increased by 1. In this example, the function has succeeded in the following rows: row 2 row 3 row 9 In this example, the function was executed successfully three times - so the final result of the function is 3. Can someone please help by creating a function dealing with this problem? TIA, Henning -- Join official facebook page of this forum @ https://www.facebook.com/* *discussexcel https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-...@googlegroups.com. To unsubscribe from this group, send email to excel-macros...@** googlegroups.com. -- Join official facebook page of this forum @ https://www.facebook.com/** discussexcel https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
$$Excel-Macros$$ Help needed to create a function within a macro
Hi NG, I need to insert a function into cell D1 with an Excel2007 macro that executes the following: A B C D row 1 12343 row 21 123444 row 31 43322 row 4 34 row 51 12 row 6 432123 row 7 43234 row 81 3 row 91 3 row 10 1 The entire table has to be considered by the function (A1:C10). Each line has to be evaluated on its own, eg A1:C1. If the contents of A or B are 1 AND the value of C is 23400, then the function has succeeded. If the function succeeds, the final result of the function has to be increased by 1. In this example, the function has succeeded in the following rows: row 2 row 3 row 9 In this example, the function was executed successfully three times - so the final result of the function is 3. Can someone please help by creating a function dealing with this problem? TIA, Henning -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com.
Re: $$Excel-Macros$$ Help needed to create a function within a macro
Hi, Insert followibg formula in D1 cell. =if(and(or(a1=1,b1=1),c123400),3,0) Hope this is what u want. Regards swapnil, On Oct 9, 2012 6:57 PM, Henning Deschka kie...@freenet.de wrote: Hi NG, I need to insert a function into cell D1 with an Excel2007 macro that executes the following: A B C D row 1 12343 row 21 123444 row 31 43322 row 4 34 row 51 12 row 6 432123 row 7 43234 row 81 3 row 91 3 row 10 1 The entire table has to be considered by the function (A1:C10). Each line has to be evaluated on its own, eg A1:C1. If the contents of A or B are 1 AND the value of C is 23400, then the function has succeeded. If the function succeeds, the final result of the function has to be increased by 1. In this example, the function has succeeded in the following rows: row 2 row 3 row 9 In this example, the function was executed successfully three times - so the final result of the function is 3. Can someone please help by creating a function dealing with this problem? TIA, Henning -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com.
Re: $$Excel-Macros$$ Help needed to create a function within a macro
see the attachment check the cells with Yellow color On Tue, Oct 9, 2012 at 8:48 PM, Swapnil Palande palande.swapni...@gmail.com wrote: Hi, Insert followibg formula in D1 cell. =if(and(or(a1=1,b1=1),c123400),3,0) Hope this is what u want. Regards swapnil, On Oct 9, 2012 6:57 PM, Henning Deschka kie...@freenet.de wrote: Hi NG, I need to insert a function into cell D1 with an Excel2007 macro that executes the following: A B C D row 1 12343 row 21 123444 row 31 43322 row 4 34 row 51 12 row 6 432123 row 7 43234 row 81 3 row 91 3 row 10 1 The entire table has to be considered by the function (A1:C10). Each line has to be evaluated on its own, eg A1:C1. If the contents of A or B are 1 AND the value of C is 23400, then the function has succeeded. If the function succeeds, the final result of the function has to be increased by 1. In this example, the function has succeeded in the following rows: row 2 row 3 row 9 In this example, the function was executed successfully three times - so the final result of the function is 3. Can someone please help by creating a function dealing with this problem? TIA, Henning -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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 post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. -- *Regards* * * *Ashish Koul* *Visit* *http://www.excelvbamacros.com/* *http://www.accessvbamacros.com/* P Before printing, think about the environment. -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 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) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or 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