Drag horizontally, increase reference vertically

Young Grasshopper

Board Regular
Joined
Dec 9, 2022
Messages
58
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Another day, another problem!

I have this code in C5: =IF('Sheet1'!B11="";"";'Sheet1'!$B11)
I need to drag C5:G5 horizontally, so this could would be copied to every 5th column, but the reference cells must increase by one vertically every time.
Like this:
C5:
=IF('Sheet1'!B11="";"";'Sheet1'!$B11)
H5: =IF('Sheet1'!B12="";"";'Sheet1'!$B12)
M5: =IF('Sheet1'!B13="";"";'Sheet1'!$B13)
etc.

How would I go about this?
Would appreciate any help:)
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
How about
Excel Formula:
=IF(INDEX(Sheet1!$B:$B,COLUMNS($C5:C5)+10)="","",INDEX(Sheet1!$B:$B,COLUMNS($C5:C5)+10))
 
Upvote 0
To me
Excel Formula:
=IF('Sheet1'!B11="";"";'Sheet1'!$B11)
and
Excel Formula:
='Sheet1'!$B11
are exactly the same thing, so why make things more difficult than they are ?
So , supposing Fluff's answer is correct ( the contrary would be astonishing) just use
Excel Formula:
= INDEX(Sheet1!$B:$B,COLUMNS($C5:C5)+10)
 
Upvote 0
Yes, as Ghunderassi said. It would work perfectly if the formula were to be in adjacent cells, but not when skipping cells.
 
Upvote 0
@ghunderassi Please do not hijack other people's threads.
If you have a question, start a thread of your own.
 
Upvote 0
In D5 it's just the same formula as C5, but with reference cell C instead, so; =IF('Sheet1'!C11="";"";'Sheet1'!C11)
E5 is blank, but is going to be used to just write in, F5 is blank but have a data validation list, G5 is just blank.
 
Upvote 0
In that case use
Excel Formula:
=IF(INDEX(Sheet1!$B:$B,INT((COLUMNS($C5:C5)-1)/5)+11)="","",INDEX(Sheet1!$B:$B,INT((COLUMNS($C5:C5)-1)/5)+11))
 
Upvote 0
Solution

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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