Creating a new column

rcwkent

New Member
Joined
Nov 23, 2017
Messages
2
Hi, I need help extracting a value from a column to create a second column.

A
1. G17
2. G16
3. G16
4. G17
5 G16
6. G17
I want a coulmn of g17 and a coumn of g16, in the current row.

To look like this:
A B
1. G17
2. G16
3. G16
4. G17
5. G16
6. G17

I'm pretty new to excel, so sorry for my inexact language.
Rich
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
In your example, it looks like you just want to separate the row number from the G value, but it sounds like you want G17 in column A and G16 in column B.

If you just want to separate the row number, the "Text to Columns" function can help.
 
Upvote 0
Imsorry.. .ugh!. My second example was wrong.
I want to have the values G16 and G17 placed in two separate columns .
 
Upvote 0
My usual go-to solution would be using VBA, but how often would you need to re-accomplish this activity? Do you want them to stay in their respective rows or condense them down by getting rid of the blanks in each column?

I'd say you can is an IF statement to get the values into the right columns and do a copy/pastespecial values. Then, run that Text to Columns function as delimiting on spaces, setting the second column to "Do not import column (skip)". In cell B2:
Code:
=IF(RIGHT($A2,3)="G16","G16","G17")
You can use the fill handle to spread that formula to the rest of that column and the next column.

If this is a task you'll need to do daily or weekly, it may be worth it to look into a VBA solution.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top