Selecting Columns

X

xnman

Is there a way to search columns D, H, P, T for number and then put that
number in column A? Columns D, H, P, T would be normally blank yet one
of them would have a number in it. I just want to have a formula or
macro that would scan those particular number, find the number (no
matter what the number is) and paste it in Column A for a summary.
My spreadsheet is huge and this summary would help.
Any suggestions would be appreciated. Thanks.

xnman
 
R

Ron de Bruin

Try this

This will copy all numbers in the Range("D:D,H:H,P:p,T:T") to column A

Sub test()
Dim a As Integer
Dim cell As Range
a = 0
For Each cell In Range("D:D,H:H,P:p,T:T").SpecialCells(xlCellTypeConstants, xlNumbers)
a = a + 1
Cells(a, 1).Value = cell.Value
Next
End Sub
 
T

Tom Ogilvy

in A1 put in the formula

=Max(D1,H1,P1,T1)

then drag fill down the column.

or
=Value(D1&H1&P1&T1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top