Selecting A Part Of Text From 1 Column And Put This In A New Column

Oct 22, 2013

I need to put a part of a text from a column and place it in a new collumn. At this moment I use 2 columns and an extra sheet to solve this.

I have a collumn with a lot of data like:aaa-bc

bbb
abc-ba-bd
aa-bb
bbb-xx-yy
aa
abc-yy
klmn-zz
klmn-yy-ff

What I need is behind every cell a new cell with only the 1st part like:aaa

bbb
abc
aa
bbb
aa
abc
klmn
klmn

What I do now is use a new column with this formula:

[Code].....

And I made a translation table in which the 1st 4 characters are translated to what I want to see. In a 3d column I use

[Code]....

to get the results I need. Since I need to get results like this very often this method is very time consuming.

Is there a formula available I can use with only 1 new column?

View 2 Replies


ADVERTISEMENT

Copy Last Part Of Text And Paste To Next Column

Nov 15, 2012

Example: A1, I go to school (001). I would like to copy only (001) and past to B1. like that and process to the last row of A1. or I would prefer manual last row.

View 9 Replies View Related

Find Part Text On All Sheets & Delete The Column

Sep 26, 2007

I am trying to move through the worksheets and delete all columns with "Accession" in contained in them. I have to do this with an external macro as the spreadsheet with the data is created from another program. I tried this and get an 'Object or With block variable not set' error and the debug highlights the Cells. Find line of the code.

Also, the number of columns could be variable within the spreadsheet as it is compiled by the other program.

Sub DelAccessionNum()
Dim Wrkst As Worksheet
For Each Wrkst In ActiveWorkbook.Worksheets
Cells.Find(What:="Accession", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False _
, SearchFormat:=False).Activate
On Error Goto Completed:
Selection.EntireColumn.Delete Shift:=xlToLeft
Completed:
Next
End Sub

View 9 Replies View Related

Identify Part Of String In One Column And Return Entry In Neighboring Column?

Feb 28, 2014

I have a spreadsheet of several thousand named items (in column B) with values associated with them in column A). The "name" field is a string of several alternative names for the item.

I have a list of ~50 items that I am trying to find the values for. Each uses one of the alternate names.

What I want is a function that will return the associated value in column A when one of my shortlist names is found.

For example, my big spreadsheet looks like:

AB
1dallas, DFW. 12345
2Atlanta, ATL, 23456
3Boston, BOS, 34567
4Chicago, CHI, 45678
5Los Angles, LA, LAX, 56789

And my list looks like

Atlanta
CHI

I want the output to look something like:

Atlanta2
CHI 4

Is the feasible? IT seems like there should be a way to do it....

View 2 Replies View Related

Selecting Unique Column Items Into Seperate Worksheet From Column

May 19, 2006

In the attached file, details sheet contains multiple instances of project with associated costs for each of 2006, 2007 and 2008. What I need is a formula (preferably) or a VBA that select distinct project names and populate column B of summary sheet so I can do a sum if. The problem is the project names changes dynamically every week and they are practically in hundreds.

View 9 Replies View Related

Selecting All Data In Specific Columns Without Selecting Adjacent Column

Mar 10, 2014

Using VBA, I need to Select A1:C14.

The problem is that A1:C14 contains blank cells, and there is also an adjacent column D that I do not want to copy.

So, UsedRegion and CurrentRegion aren't doing it for me. (It selects Column D too.)

Obviously, this is an example...the real data set is an export and varies in size.

View 1 Replies View Related

Copy Part Of A Column To Another Column On Different Worksheet

May 4, 2007

I have column t6:t23 on sheet one that i want to copy and paste to the next available column in sheet2 but it has to start looking for the next available column starting at at row2 because row 1 has column header.

I know this can be done with (xltoright) just not sure how to do it

View 9 Replies View Related

Excel 2010 :: Move Part Columns Of Data From 6 Columns To Form 1 Large Column In Column A?

Jan 31, 2013

I have a large spreadsheet converted from pdf whose data still appears in A4 reading format.

I need to move part columns of data from 6 columns to form 1 large column in column A.

For example, move range B8 to B76 beneath range A8 to A76 and range C8 to C76 beneath that etc, page by page working through all 270 pages !

Also need to delete unnecessary 'page headers' throughout as in rows 2-6

View 2 Replies View Related

How To Take Part Of The Content From One Column And Put In Next Column

May 16, 2014

I have 5000 urls in one column and I want to take some part of the content from the urls and wanted put in next column in their respective cell.

how I wanted the data in the next column.

View 11 Replies View Related

Finding Column Name Using VBA And Selecting Column After?

Jul 2, 2013

augmenting current code to select the column after a column. Current code is:

Code:
If Sheets(data_sheet1).Cells(2, iCol).Value = "Stations" Then TargetCol = 1
If Sheets(data_sheet1).Cells(2, iCol).Value = "Agency" Then TargetCol = 2
If Sheets(data_sheet1).Cells(2, iCol).Value = "Advertisers" Then TargetCol = 3
If Sheets(data_sheet1).Cells(2, iCol).Value = "Product Code" Then TargetCol = 4
The next line should find the column after "Product Code".

View 1 Replies View Related

Selecting A Column

Jan 28, 2010

I need to select the whole column ABOVE the active cell. Ctrl-Shift-UpArrow is no good because it stops at the first blank cell. And selecting the whole column is no good either because when I subsequently paste into the column, it pastes in all the empty cells of the column, meaning my worksheets expands from a few hundred rows to 1 million!

Shift-Home does what I want on rows. Is there an equivalent for columns?

View 9 Replies View Related

Selecting More Than One Column

Oct 4, 2013

Cells(xrow, 3).Select --

Is there any way I can select more than one column.

I tried Cells(xrow, 3:10).Select but it gives error.

View 3 Replies View Related

Selecting Column By Its

Jul 3, 2008

I wrote a Macro that select info from Worbook "A" to Workbook "B". In that Macro tha columns B:B, E:E and F:F are selected.

The problem is that the layout is not always the same so the correct columns keep shifting positions. The only thing that never changes is the "Column Label" in the first Row.

So, no matter from which column I alway have to copy: "Order Date"; "Status" and "MetofPay".

Is there anyway to tell my macro to look for those columns instead of B:B, E:E and F:F?

View 9 Replies View Related

VBA Filter Part Of Column

Feb 19, 2013

I've managed to use the following VBA to filter a sheet based on the value of cell B1:

Private Sub Worksheet_Change(ByVal Target As Range)
If (Intersect(Target, Range("B1")) Is Nothing) _
Then
Exit Sub
End If
Cells.AutoFilter Field:=1, Criteria1:="=" & Range("B1")
Range("B1").Select
End Sub

I have tried to use this for a different sheet with "fixed head data" that needs to stay at the top of the page (range B1:K7), for printing purposes.

How to modify the above code to filter column A (from row 8 downwards) depending on what's entered in the cell A1.

Also - if possible, "if A1 is empty - display all rows".

View 3 Replies View Related

Selecting Column To Loop Through

Jan 26, 2009

I have created a macro that loops through column 4 and gives the value of 2 other cells acording to what is found.

The problem comes when the macro only works sucecefully if i click on a cell in that column. Therefore i think the macro is not doing this.

Im sure that i have used the right code does anyone know what is wrong.

View 12 Replies View Related

Selecting The Last Value From A Column Of Values

Jun 21, 2007

I have a table of numbers to which a new number is added every day. I want to reference the last value in a separate cell. For example, in cell A1 I want to insert a formula that will look at Column B and select the last value. The values in Column B wil be added to each day, ie a new row will be inserted.

View 9 Replies View Related

Conditional Formatting Of A Part Of Column

Dec 21, 2013

I'm trying to build a simple spreadsheet that allows me to auto highlight the day in the week and part of the column.

I include a sample sheet... above saturday there is the formula I use to determine the day of the week.

View 14 Replies View Related

Copy / Paste Part Of Column Into A Row

May 13, 2014

I have data that looks like this:

ADD ADD 5
ADD EMPTY 2
AGAINAGAIN26
AGAIN EMPTY17
AGAINBACK 1
ALL ALL 24
ALL EMPTY19
ALRIGHT FINE 1
ALRIGHT OKAY 2
ALRIGHT ALRIGHT3
ALRIGHTEMPTY3
ALRIGHTRIGHT1

I want it to look like this:

ADD ADD EMPTY
5 2
AGAINAGAINEMPTY BACK
26 17 1
ALL ALL EMPTY
24 19
ALRIGHTFINE OKAY ALRIGHTEMPTYRIGHT
1 2 3 3 1

i.e all the entries from column B that have the same thing in column A should be on a row together, with the number from column C under them.

If that's a bit hard then it would be OK if it looked like this:

ADD ADD 5
ADD EMPTY 2

AGAINAGAIN26
AGAIN EMPTY17
AGAINBACK 1

ALL ALL 24
ALL EMPTY19

ALRIGHT FINE 1
ALRIGHT OKAY 2
ALRIGHTALRIGHT3
ALRIGHTEMPTY3
ALRIGHTRIGHT1

test.xlsx

View 5 Replies View Related

Selecting Only A Part Of A Merged Range

Aug 1, 2008

i have a merged cell which runs across a multiple columns (but a single row). i would like to insert a column in the middle of this merged cell, but whenever i click on the column header to insert a column, the entire merged range is selected.

is there a way to change the excel setting to avoid this?

View 9 Replies View Related

Selecting From A Changing Column Of Numbers?

Jun 7, 2014

I am creating a spreadsheet to manage Block ID conflicts when adding mods to a Minecraft Server. Example spreadsheet is attached.

Description: Column A contains a list of available numbers (e.g. 1-20 and 31-50). Column B contains a list of numbers a new mod tries to use up by default (i.e. 1-25). A number in Column B that is not in Column A must be changed to the nearest number that is in Column A. In this example, numbers 21-25 in B are not available in A and must be changed to 31-35, respectively. Column C should be the result of changing Column B (i.e. 1-20 and 31-35).

Issue: The main problem is that as a given cell in Column B changes, that number needs to become unavailable in Column A for the next change. For example, when 21 in B returns 31, 31 can no longer be used for the next number in B (22).

I have been able to use VLOOKUP or INDEX/MATCH functions to lookup the numbers to be changed.

View 2 Replies View Related

Finding And Selecting Last Non-Zero Cell In A Column

May 20, 2014

I putting together a spreadsheet that applies Payments (as they come in) against the oldest open invoice. As payments come in, old invoices are closed out. An aging is done and late fees are applied.

I have made a macro that inputs all of the information of the invoice in a list. However, when a payment comes in, I am trying to write a macro that:

1) in column G - Finds the first non-zero balance
2) Applies the payment amount to that open invoice. If there is additional funds left over after the satisfaction of that invoice, I would like the payment to be applied to the next open invoice until all the funds of the payment have been drained.

I am having so much trouble trying to even just locate the first nonzero balance and select it.

View 13 Replies View Related

Selecting Next Empty Cell In Column

Feb 12, 2010

I would like to select the next empty cell in columb A after running this macro, what code do I need to add to this to enable that.

View 2 Replies View Related

Selecting Range 6 X The Length Of Another Column?

May 15, 2012

I have a worksheet which already has some built in formulas which take the data in columns V and W, and use them to build other coding in column P. The trick is that the coding created in column P will be six times as long as the source data in columns V and W.

I.e., a single row containing "Sample1" and "Sample 2" in columns V and W respectively create the six following rows in column P:

Row 1:
Row 2: TMUnknown
Row 3: tested1
Row 4: Sample1
Row 5: Sample2
Row 6:

I want to be able to select the accurate length of Column P, which should be 6x as long as columns V or W. Any dynamic way to do this? (Since the amount of data pasted into columns V and W will change each time I use this worksheet.) I know how to select set ranges, but not how to adjust them as multiples of the length of another column

View 4 Replies View Related

Selecting Range Of Rows In Column

Sep 11, 2013

I want to select a range of rows 11, 14 and 23 to 24 in column j, plus the 2 rows to the right of column J and run a sum formula on the range. My procedure is selecting rows 11/14/23/24 and doing the sum for only column J. How do I make it so it runs the sum formula on all 3 columns. My code is copied below. I am fairly new to VBA.

Code:
With ActiveSheet.Range(Cells(27, j), Cells(27, j)).Select
Set sumRng = Intersect(Range("15:21, 25:25"), Columns(j)).Offset(0, 2)
ActiveCell.Value = WorksheetFunction.Sum(sumRng)
End With

View 4 Replies View Related

Selecting The Whole Column As Range In Macro

Jul 17, 2008

I am working on a VBA macro, using the following

With wsSheet.Range("A:A")
ReDim MyArray(1 To .Rows.Count, 1 To .Columns.Count)
MyArray = wsSheet.Range("A:A")
For i= 1 To .Rows.Count
For j= 1 To .Columns.Count
wsSheet.Cells(i, j+ .Offset(0, 3).Column) = MyArray(i, j)
Next: Next

I want to select alla values in column A, but when I specify the range as "A:A" the code results in an infinite loop! How can I come around this?

View 9 Replies View Related

VBA - Selecting The Last Cell In A Column With Data

Oct 6, 2008

I am trying to write some VBA code to select a range in a column going down to the last item in the column.

So I want to write a macro that will copy cells B4 - B17 into cells A4 - A17 but am having trouble with the code that will select B4 - B17. When I use the usual code which is as follows:

ActiveSheet.Range("b4", ActiveSheet.Range("b1").End(xlDown)).Select
it selects down to A75, and I know why this is but not how to fix it.

This is raw data extracted from a third-party system. It has an option to export to Excel, but where it appears to have blank cells Excel actually believes there is data in there.

So is a way to identify what data Excel thinks is in there and perhaps use this to be able to select the range I want?

Different extractions will need a different range moved over - however it will always start at B4 and go down to B-whatever.

View 9 Replies View Related

Selecting Newest Date From A Column

Dec 22, 2009

I want to seach and select the newest date in a column. There are green, red and black fonts in the column. I only want to only seach the cells with black fonts.

View 9 Replies View Related

Selecting A Variable Column Range

Jun 21, 2006

I have a workbook that generates sheets for each year based on selected criteria. It starts at Column H and goes too AH and beyond. When my loop reaches Z it errors out. I think this is happening because the code is referencing the column as ASCII. Here is the

Sub Test()
Dim d As Date
Dim yrint, i, num_years, fields, field_start As Integer
Dim yrstr, crit1, crit2, left_column_range_fixed, right_column_range_fixed, left_column_range_var, right_column_range_var, left_column_range, right_column_range, cost_column, cost_column_var, cost_column_fixed As String
left_column_range_fixed = "H"
right_column_range_fixed = ":AH"
cost_column_fixed = "2"
crit1 = "=x"
crit2 = ">0"
d = Date
yrint = Sheets("Overall"). Range("H2")
field_start = 9 'changed from 9....................

View 4 Replies View Related

Selecting 1 Row, While 2 Cells Of The First Column Are Merged

Jul 14, 2006

how can i (in VBA) select 1 row (eacht time, it's an ? iteration? (repeating)), while the first 2 cells are merged, like:

a b c d .....
1
2 merged
3 merged

and i need to select row 3 only

and if someone could explain me how i can use the " find" function (on another sheet)

View 5 Replies View Related

Selecting Cell At Row/column Intersect

Jan 12, 2007

The match results are posted on another sheet and the winner allocated the letter W and the loser allocated L (in the sample workbook attached these are on sheet2 cells B1 and B2 with the winners name in A1 and the losers in A2, i.e. Bill and Susan) I have the code for this working properly.

What I need to do next is transfer the W and L onto the grid in sheet1 and insert the W in the cell that is the intersection between the row with the winners name and the column with the losers name. Then insert the L in the cell that is the intersection between the row with the losers name and column with the winners name. I hope that makes sense!

If it is simpler to insert the W and L into the grid directly from the winner and loser names in sheet2 col A rather than allocating the W and L in col B first, then that is great.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved