How to change the cell reference of many formulas quickly?

Computer

New Member
Joined
Jan 24, 2019
Messages
9
SubjectStart DateStart TimeEnd DateEnd TimeAll Day EventDescriptionLocationPrivate
Orient1/7/20198a1/7/201912pFALSESpring Orient. Rm 681TRUE
LM1/7/20191p1/7/20194pFALSEResume Building rm 681TRUE
LAB1/8/20191p1/8/20194pFALSESkills LabTRUE
AH1/9/20198a1/9/201912pFALSESkills LabTRUE

<tbody>
</tbody>

The formula in cell A2 looks like this { =IF(ISTEXT(LEFT(OFFSET('Spring Weekly schedule'!C$6,0,ROW()-2),SEARCH(" ",OFFSET('Spring Weekly schedule'!C$6,0,ROW()-2))-1)),LEFT(OFFSET('Spring Weekly schedule'!C$6,0,ROW()-2),SEARCH(" ",OFFSET('Spring Weekly schedule'!C$6,0,ROW()-2))-1),"") }

Id like to be able to quickly change the row reference for C$6 as there are many cells and Ill do this many times. I was hoping I could do something like C$(B22) and then every time change the number in B22 it auto populates. Is this possible or is there some other reasonable solution?
 
can someone tell me how to post an image?

Hi, in general, images are not a good way to show your set-up - if someone wants to help and needs to re-create your sheet for testing then they would need to manually re-type all the data from the image, some may be willing do that but I suspect most would not (me included ;))

There are tools you can use to post copyable data directly to the forum, which you can find here https://www.mrexcel.com/forum/about-board/508133-attachments.html

Or you can upload a pared-down copy of your workbook to a file sharing site (like dropbox) and share the link here - you should note that this method restricts your potential helpers to those that are willing and/or able to take the risk opening files from unknown sources.

it returns blanck cells all the way through


What cell did you enter the formula in?
What value did you have in B22?
What did you have in column C onwards for the row entered in B22 on the sheet
'Spring Weekly Schedule'?
 
Last edited:
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You DO NOT need to use array entry (Ctrl+Shift+Enter).

I'm sorry I see now you do not need {}

It works with them I now see and works without them.

But your script does work for me. I original mentioned using name range which also works but was not originally able to see image.

Thanks for your knowledge.
 
Upvote 0
I will attempt to share a copy.


What cell did you enter the formula in?
What value did you have in B22?
What did you have in column C onwards for the row entered in B22 on the sheet
'Spring Weekly Schedule'?


I entered it in A2 of the second sheet, I changed B22 to B23 as I told you the incorrect cell.

In B22 I have on the number 6.

In Row 6 starting with column C it is the data I started the thread with. -
Orient 8a-12pL&M 1p-4pLAB 1p-4pAH 8a-12p

<tbody>
</tbody>
 
Upvote 0
Hi, with the set-up you describe - these are the results I get. Are they what you expect?


Excel 2013/2016
AB
2Orient
3L&M
4LAB
5AH
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
236
Sheet1
Cell Formulas
RangeFormula
A2=TRIM(LEFT(SUBSTITUTE(INDEX('Spring Weekly Schedule'!$C:$Z,$B$23,ROWS(A$2:A2))," ",REPT(" ",255)),255))



Excel 2013/2016
CDEF
6Orient 8a-12pL&M 1p-4pLAB 1p-4pAH 8a-12p
Spring Weekly Schedule
 
Upvote 0
It looks like cell B23 that you are using for the row number is in the "Spring Weekly Schedule" sheet.

See adjustment.

=TRIM(LEFT(SUBSTITUTE(INDEX('Spring Weekly schedule'!$C:$Z,'Spring Weekly schedule'!$B$23,ROWS(A$2:A2))," ",REPT(" ",255)),255))
 
Last edited:
Upvote 0
From looking at your image in Post 1

Is Subject in A1
Is Orient in A2
And Orient is the result of the formula correct?


If not please explain.
 
Upvote 0

Forum statistics

Threads
1,216,126
Messages
6,129,021
Members
449,480
Latest member
yesitisasport

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