Under a deadline - need help

braindiesel

Well-known Member
Joined
Mar 16, 2009
Messages
571
Office Version
  1. 365
  2. 2019
  3. 2010
Platform
  1. Windows
For some reason, when I use the
selection.value = named range.value line of code, I get TRUE instead of a number that I need for a VLOOKUP
When I rerun the line of code it works,

So, in absence of a better answer,

I want to have the code look to see if all of the values are numbers. If not then I wan to rerun the code a second time.

I cannot use do loop as if this doesn't work I will just be stuck in a loop/

What do I need to do with this
If Selection.Cells.Count <> Range("mySimplyAcctRev").Rows.Count Then

so that the first part verifies that each cell contains a number, not text?

Your help is really appreciated
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
isNumeric(expression or variable to evaluate) returns true/false. So If IsNumeric(...).
 
Upvote 0
selection.value = named range.value should be returning either true or false depending on whether the selection equals your named range.

If selection.value = named range.value Then

Vlookup(selection.value, etc etc)

End If

?
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

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