Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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 -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate How the Number of Specific word. Khalid A. Al-Otaibi Excel Discussion (Misc queries) 1 April 5th 10 07:53 AM
Find what numbers add up to a specific number heathersm1 Excel Worksheet Functions 2 March 24th 09 06:07 PM
Calculate the number of days from a specific date Oceangate Excel Discussion (Misc queries) 5 November 18th 08 01:42 AM
How to calculate number of occurencies of a specific number number Stefan Excel Discussion (Misc queries) 4 September 8th 08 08:33 AM
How to Find a Specific First Number in a Row AltaInd Excel Discussion (Misc queries) 4 March 2nd 07 06:57 PM


All times are GMT +1. The time now is 03:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"