Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Selecting Columns

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Selecting Columns

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(xlCellTypeCo nstants, xlNumbers)
a = a + 1
Cells(a, 1).Value = cell.Value
Next
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"xnman" wrote in message ...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Selecting Columns

in A1 put in the formula

=Max(D1,H1,P1,T1)

then drag fill down the column.

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


--
Regards,
Tom Ogilvy


"xnman" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting nonadjacent columns? Barnsie Excel Worksheet Functions 1 February 3rd 10 02:28 AM
Selecting different multiple columns rcg Excel Worksheet Functions 1 September 26th 06 05:58 PM
Selecting multiple columns for subtotals CEG Excel Discussion (Misc queries) 2 January 31st 06 06:50 PM
selecting columns in a worksheet nuti Excel Worksheet Functions 1 January 12th 06 01:06 PM
Selecting Multiple Columns Jay[_12_] Excel Programming 1 October 13th 03 05:35 PM


All times are GMT +1. The time now is 08:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"