How to copy from two cells, skip a cell, and copy from next two

dmb41

Board Regular
Joined
Nov 10, 2010
Messages
75
I am looking to extract data from one spreadsheet to input on another spreadsheet.

The issue is that it is two cells next to one another, then a blank cell, then two cells next to one another ... repeating

Is there a formula where I could skip the cell in between to gather this input?

What I am looking for is the following:

Code:
=SUM(HorzVert!A27:B27)
Code:
=SUM(HorzVert!D27:E27)
.
.
.

following the pattern AB, DE, GH, IJ, etc.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
What cell will the first sum be in? Will you be dragging the formula down or accross?
 
Upvote 0
Code:
=SUM(HorzVert!N27:O27)

This will be dragged across to output Q & R, T & U, etc. (skips a letter/cell each time)
 
Upvote 0
You did not say what cell the sum of A27:B27 would be in. I have assumed it to be A28. In A28 use


=SUM(HorzVert!A27:B27)
</PRE>in B28 and dragged across try: =SUM(OFFSET(HorzVert!A27,0,COLUMN()*2-1,1,2))
 
Upvote 0
I can get what you have provided to work on a test sheet when I start in cell A.

My specific example has the data in cells N27 & O27, Q27 & R27, and so on...

For simplicity, the on sheet which sums these two cells I can start in whichever cell , say N27.

=SUM(HorzVert!N27:N27)

I have tried altering what you have provided, but cant get it to work.
=SUM(OFFSET(HorzVert!N27,0,COLUMN()*2-1,1,2))
Does the column offset need to be adjusted because I am starting at N?
 
Upvote 0
The offset does need to be adjusted based on where the sums begin. that is why I asked "What cell will the first sum be in?".

Based on starting in column N try: =SUM(OFFSET(HorzVert!$N27,0,COLUMNS($N:N)*3-3,1,2)) dragged across as needed.
 
Upvote 0
Thank you that is exactly what I was looking for. I have never used the offset function in that way before so I was altering the wrong part of it. I think its the the *3-3 part which I was inputting wrong.

Thanks for your time!
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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