hopefully simple problem

asker2

New Member
Joined
Dec 18, 2005
Messages
5
sounds simple, but I have not been able to write a formula (for problem below) which can be extended down through a long column by using EDIT-FILL DOWN.

The problem is to take an existing long column of different numbers (COL A), and create a second column (COL B) with each number from COL A repeated once. e.g. 1,1 2,2 3,3 4,4 etc.

thanks for any help in creating formula to accomplish this
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hello, asker2
Welcome to the Board !!!!!

this is not really clear to me

what would be the results in B1 ... B5 (?) when column A has
A1: 1
A2: 5
A3: 5
A4: 1
A5: 2

kind regards,
Erik
 
Upvote 0
here is what I expect col A and col B (after applying formula) to show:

col A col B
1 1
2 1
3 2
4 2
5 3
3
4
4
5
5
 
Upvote 0
asker2 said:
here is what I expect col A and col B (after applying formula) to show:

col A col B
1 1
2 1
3 2
4 2
5 3
3
4
4
5
5
is this a response to my question or a new example ?
can you explain why col B stops at 3 ?
 
Upvote 0
Code:
col A  col B
1       1
2       1
3       2
4       2
5       3
        3
        4
        4
        5
        5

now I see :)
your example is not displayed as intended !
TIP1: always check your posts
TIP2: for such little samples you can use the codebutton (above your messagebodywindow when writing a post)
else check the HTMLmaker link at the bottom of the page

you would need this formula
=INDIRECT("A" & TRUNC((ROW()+1)/2))

kind regards,
Erik
 
Upvote 0
Erik,

That's a beautiful display of your knowledge of EXCEL. Way over my capabilities, and I do very much appreciate your time and effort.

Great solution, :biggrin:
Alan
 
Upvote 0
Way over my capabilities
take a look at INDIRECT in the helpfiles
take a look at ROW
the other stuff is just mathematics or "trial and error"
then once it will be way under your capabilities :)
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,426
Members
448,961
Latest member
nzskater

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