For each cell - if IsNumber - return if no number found

Barsoe

New Member
Joined
Mar 12, 2022
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Hi

My question is in the code

VBA Code:
Public Sub findforeach()
Dim ws As Worksheet
Set ws = ActiveSheet
' how do I return these :
' if no cell in below range with number value is found then
' if below if statement is true for the first number value found (most likely in A45) then
Dim Cell As Range
For Each Cell In Range("A45:a61")
If Application.WorksheetFunction.IsNumber(Cell.Value) = True And Cell.Offset(0, 37) = "" Then
    MsgBox ("Found number " & Cell.Value)
    Cell.Offset(0, 37) = "username & date"         
    Else
    End If
Next Cell
End Sub
 
This "Number values represent product codes and text values represent costs of various kind." confuse me
It means Product code in number, and cost in text ?!?
Is it actually product code in text, and cost in value?
It should be best help, if you can upload image/screenshot to see what is in column A and AL (hide columns between those columns)
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,091
Latest member
gaurav_7829

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top