![]() |
Code to find specific number and calculate
On Jan 31, 2:58*pm, "Annette" wrote:
Thanks, Mike ... this is exactly what I need, now I should be able to modify for the other numbers to divide by different amounts other than 25! This works really well! Annette "Mike H" wrote in message ... Or in a macro Sub stance() Set myrange = Range("A1:A100") For Each c In myrange * If InStr(1, c.Value, "067", 1) 0 Then * On Error Resume Next * * * *c.Offset(0, 3).Value = c.Offset(0, 2).Value / 25 * *End If Next End Sub Mike "Annette" wrote: Hi! *How would I write into my code to look in cells in column one for a specific number and then divide by 25. *Here's a sample of the number: col 1 * * * * * * * * * * * *col 2 * * * *col 3 02.3892.067.033 * * descrip. * *2025 I want the macro to see the .067 in the cell, and then in column four, Your welcome divide the number found in column three by 25 and display number in column four. So what the result displayed: *col 4 would be 81 I hope this makes sense. Thanks for any help provided. Annette- Hide quoted text - - Show quoted text - |
All times are GMT +1. The time now is 08:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com