Retrieve value from alternating rows

theraindew

New Member
Joined
Dec 7, 2018
Messages
11
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a sheet where i need the contents of A2 to appear in B3 and contents of A3 to appear in B2. The contents could be numbers or text or a mix of both. I can do this by just referencing the alternate cells, but there are about 900 rows and the count changes everyday. Is there an easier way to achieve this using a formula to enter in B2 and drag down or using VBA?

ck.xlsx
ABC
1ItemResultFormula for Reference
2AppleOrangeOrange
3OrangeAppleApple
4GrapeApricotApricot
5ApricotGrapeGrape
Sheet1
Cell Formulas
RangeFormula
C2,C4C2=A3
C3,C5C3=A2
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
How about
Fluff.xlsm
ABC
1Item3652016
2AppleOrangeOrange
3OrangeAppleApple
4GrapeApricotApricot
5ApricotGrapeGrape
6PearMangoMango
7MangoPearPear
Main
Cell Formulas
RangeFormula
B2:B7B2=LET(d,A2:A7,s,SEQUENCE(ROWS(d)),INDEX(d,MOD(s,2)+s-ISEVEN(s)))
C2:C7C2=INDEX($A$2:$A$7,MOD(ROWS(C$1:C1),2)+ROWS(C$1:C1)-ISEVEN(ROWS(C$1:C1)))
Dynamic array formulas.
 
Upvote 1
Solution
Like this?

23 06 29.xlsm
AB
1ItemResult
2AppleOrange
3OrangeApple
4GrapeApricot
5ApricotGrape
Swap
Cell Formulas
RangeFormula
B2:B5B2=INDEX(A:A,ROW()+IF(ISODD(ROWS(B$2:B2)),1,-1))
 
Upvote 1
Thank you Fluff and Peter, exactly what I wanted. Both of your formulas work.
 
Upvote 0
For XL365, this formula would also work...
Excel Formula:
=TOCOL(CHOOSECOLS(WRAPROWS(A2:A7,2),2,1))
 
Upvote 1
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,366
Messages
6,124,516
Members
449,168
Latest member
CheerfulWalker

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