Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Corresponding Range in another column
Excel Experts,
My spreadsheet is similar to the following: A B C D 1 Trader Action Quantity Fees 2 Bill 20 3 Bill 20 4 Steve 30 5 Steve 30 I've defined cells A2..A5 as a variable Trades I've defined cell D1 as a variable Fees How do I select the range D2..D5, that is, the same cells as in Trades, but in the column where Fees is? My code so far: Sub Fees() Cells.Find(What:="TraderID").Offset(1).Select Range(Selection, Selection.End(xlDown)).Select Set Trades = Selection Set Fees = Cells.Find(What:="Fees") End Sub Thank you, Alan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Corresponding Range in another column
something like this. untested
mc=rows(1).find("Fees").column lr=cells(rows.count,mc).end(xlup).row set fees=range(cells(2,mc),cells(lr,mc)) -- Don Guillett SalesAid Software "achidsey" wrote in message ... Excel Experts, My spreadsheet is similar to the following: A B C D 1 Trader Action Quantity Fees 2 Bill 20 3 Bill 20 4 Steve 30 5 Steve 30 I've defined cells A2..A5 as a variable Trades I've defined cell D1 as a variable Fees How do I select the range D2..D5, that is, the same cells as in Trades, but in the column where Fees is? My code so far: Sub Fees() Cells.Find(What:="TraderID").Offset(1).Select Range(Selection, Selection.End(xlDown)).Select Set Trades = Selection Set Fees = Cells.Find(What:="Fees") End Sub Thank you, Alan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
AVERAGE a range in a column if another column's range equals a val | Excel Discussion (Misc queries) | |||
formula to sort a range so that it matches the exact rows of a column that is outside that range? | Excel Discussion (Misc queries) | |||
How to count dates within a certain range in a column with mutiple date range entries | Excel Worksheet Functions | |||
CountIf first column range = "Word" and second column range <> 0 | Excel Worksheet Functions | |||
Transfering VBA Array Column Range to Excel Column Range | Excel Programming |