ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I pick the only number in a column and copy it to another? (https://www.excelbanter.com/excel-discussion-misc-queries/147296-re-how-do-i-pick-only-number-column-copy-another.html)

JMay

How do I pick the only number in a column and copy it to another?
 
Paste this into a Standard Module (Change as needed... I've treated your
Column as Column F and I am sending a copy to Cell J1 (on the same
Worksheet).. So
Change according to your needs..
Hope this helps.....
Jim May

Sub foo()
Set MyRange = Range("F2:F" & Cells(Rows.Count, "F").End(xlUp).Row)
For Each c In MyRange
If Application.WorksheetFunction.IsNumber(c) Then
c.Copy Range("J1")
End If
Next

"Mawaller" wrote:

I have a column that contains a formula which will return 50 results. 49
results will be false. One will be an actual number. I need to copy that
number to another cell automatically. Sounds simple right? The number will
move around the column depending on user input. It will rarely be in the same
location twice. I need to tell Excel to find the number in the column (there
will always be just one) and copy it to a new cell. If the spreadsheet would
be helpful, let me know who to email it to.



All times are GMT +1. The time now is 07:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com