Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Splitting Column in to 2 columns
Hi,
I have a column of values of finance data. ColumnB with 10 values ($10,$20,$30,$40,$50,$60,$70,$80,$90,$100). User is prompted to select a row of these 10 rows. Suppose user selects row#5 with $50 value. How should I copy the values UPTO row#5 of Column B and paste in Column C without hardcoding? How should I copy the values AFTER row#5 UPTO row# 10 of Column B and paste in Column D without hardcoding? Thanks...Appreciate your help. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Splitting Column in to 2 columns
Sub Test()
Dim iLastRow As Long Dim i As Long Dim EndCell As Range iLastRow = Cells(Rows.Count, "B").End(xlUp).Row Set EndCell = Application.InputBox("Select the last cell for column C", Type:=8) Range("B1").Resize(EndCell.Row).Copy Range("C1") EndCell.Offset(1, 0).Resize(iLastRow - EndCell.Row).Copy Range("D1") End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Dimri" wrote in message ... Hi, I have a column of values of finance data. ColumnB with 10 values ($10,$20,$30,$40,$50,$60,$70,$80,$90,$100). User is prompted to select a row of these 10 rows. Suppose user selects row#5 with $50 value. How should I copy the values UPTO row#5 of Column B and paste in Column C without hardcoding? How should I copy the values AFTER row#5 UPTO row# 10 of Column B and paste in Column D without hardcoding? Thanks...Appreciate your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum up columns in different sheet with error check | Excel Discussion (Misc queries) | |||
Summing one column if two other columns' values appear in other sh | Excel Worksheet Functions | |||
how can i multiply two columns | Excel Worksheet Functions | |||
creating a bar graph | Excel Discussion (Misc queries) | |||
Splitting text in one column into two (or more) columns. | Excel Worksheet Functions |