ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Search for anything but (https://www.excelbanter.com/excel-programming/297909-search-anything-but.html)

ianripping[_64_]

Search for anything but
 
I have a list from a1:a200

I want it so that if any values anywhere in that list are entered the
they should be copied and pasted in the b column starting at b1.

Eg if a5 = 10 and a27 = hello

B1 = 10
B2 = hello

any idea's

--
Message posted from http://www.ExcelForum.com


BrianB

Search for anything but
 
Try this macro :-

'-----------------------------------
Sub test()
Dim Arow As Long
Dim Brow As Long
Brow = 1
For Arow = 1 To 200
If ActiveSheet.Cells(Arow, 1).Value < "" Then
ActiveSheet.Cells(Brow, 2).Value = _
ActiveSheet.Cells(Arow, 1).Value
Brow = Brow + 1
End If
Next
End Sub
'--------------------------------------

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 02:12 AM.

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