Increment columns in a formula while dragging down

Cowboy95

New Member
Joined
Nov 19, 2021
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Sorry, I have other threads very similar to this, but I can't quite get the solutions found there to work for me.

This is a very simple formula, hoping for a simple solution. Formula: =IF(C7="",NA(),C7).

I would like to copy/drag down a column having the column change, not the row, so =IF(D7="",NA(),D7), =IF(E7="",NA(),E7), and so on.

Thanks in advance!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
What cell are you putting that formula in to start with?
 
Upvote 0
What cell are you putting that formula in to start with?
The cell the formula is in is T5. I was using a simple cell reference =C7, but I now would like for a return of #NA if C7 has no value.
 
Upvote 0
Ok, how about
Excel Formula:
=LET(I,INDEX($C$7:$S$7,ROWS(T$5:T5)),IF(I="",NA(),I))
or a spill formula
Excel Formula:
=LET(I,INDEX($C$7:$S$7,SEQUENCE(17)),IF(I="",NA(),I))
 
Upvote 0
It's very possible it has something to do with my implementation of this formula, but those formulas returned #name?.

Also, wouldn't I need to remove the $ for the cell references for it to incrementally change columns?

I can't upload the mini-sheet app at this time, but will add a couple of pictures for reference.

These are the cells being referenced, where the input will occur.
1645728295131.png


I have manually typed out the formula from my original post to return the #NA, which is what you see here, but I need to do this for many more exams.
1645728156652.png
 

Attachments

  • 1645728063395.png
    1645728063395.png
    4.9 KB · Views: 13
  • 1645728206797.png
    1645728206797.png
    5.2 KB · Views: 11
Upvote 0
Do you have the LET function?
 
Upvote 0
In that case can you post an image of exactly what & where the formula is.
 
Upvote 0
Fluff, thank you for your help on this. I have figured out a simpler solution to accomplish what I need, leave it to me to make things difficult! However, I am surprised that such a complex (at least in my mind) formula is needed to accomplish my original request.

My solution was to switch the months and categories row/columns, so the months were listed in the columns instead of the rows, this allowed to easily drag/copy the formula across the columns, changing the columns in the formula while the row remained the same.
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

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