Rewriting equation for VB
I have the following equation
.MaximumScale = 5 * RoundUp((Max / 5) / (10 ^ (Len((Max / 5)) - 1)), 0) * (10 ^ (Len((Max / 5)) - 1)) Max is a value that's previously been determined and the formula are the Excel equivalents. How do I rewrite this so that it's evaluated programmatically? Thanks in advance, Barb Reinhardt |
Rewriting equation for VB
This? Or have I missed something?
MaximumScale = 5 * Application.RoundUp((Max / 5) / (10 ^ (Len((Max / 5)) - 1)), 0) * (10 ^ (Len((Max / 5)) - 1)) "Barb Reinhardt" wrote: I have the following equation .MaximumScale = 5 * RoundUp((Max / 5) / (10 ^ (Len((Max / 5)) - 1)), 0) * (10 ^ (Len((Max / 5)) - 1)) Max is a value that's previously been determined and the formula are the Excel equivalents. How do I rewrite this so that it's evaluated programmatically? Thanks in advance, Barb Reinhardt |
Rewriting equation for VB
Think you would need the second argument to roundup as well.
-- Regards, Tom Ogilvy "Toppers" wrote in message ... This? Or have I missed something? MaximumScale = 5 * Application.RoundUp((Max / 5) / (10 ^ (Len((Max / 5)) - 1)), 0) * (10 ^ (Len((Max / 5)) - 1)) "Barb Reinhardt" wrote: I have the following equation .MaximumScale = 5 * RoundUp((Max / 5) / (10 ^ (Len((Max / 5)) - 1)), 0) * (10 ^ (Len((Max / 5)) - 1)) Max is a value that's previously been determined and the formula are the Excel equivalents. How do I rewrite this so that it's evaluated programmatically? Thanks in advance, Barb Reinhardt |
All times are GMT +1. The time now is 05:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com