Find XlSpecialCellsValue.xlNumbers in a column with formula

cdmciver

New Member
Joined
Mar 10, 2016
Messages
1
Hello there, MrExcel community!

I've spent a few days now trying to find the answer to the question I am about to pose but I am still missing some that I fear is very simple.

I have two adjacent columns of formula, one will return a row number from another sheet or "", the other will return a low numerical value if there is anything but "" in the adjacent cell. If the adjacent cell is "", this cell will also return "". So I end up with somthing like this:

A---B

23--2


35--1
36--1


72--2

What I would like to have is a bit a vba that will go down column B and if it finds a numerical value, store it in a variable and store the number in column A in a variable. The go to a separate sheet and create a new list with B*instances of A. So the new list would look like:

23
23
35
36
72
72

I believe I know how to do all of it but one thing, and that is hopping between cells containing any number in a column.

This is the code I have been using:

Range("B1:B1000").Find(XlSpecialCellsValue.xlNumbers, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext).Select

Which works fine for the number 1! Anything over 1 is just rudely ignored, and it continues until it finds the next instance of 1. So, clearly my understanding of xlNumbers is wrong, I thought it was any number. Is there a format, condition or something I am unaware of?

Thanks in advanced!

Cayne
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,215,473
Messages
6,125,018
Members
449,203
Latest member
tungnmqn90

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