How to not change certain values when dragging in Google Sheets

0

I have a formula like below

=HYPERLINK(CONCATENATE('Code Repository'!B2, "/browse/master/", C4, ";", 'Code Repository'!B3, "$", D4), "Link")

I don't want 'Code Repository'!B2 and 'Code Repository'!B3 to change when I drag the formula into multiple rows. But they are incrementing along with C and D values in the formula. For example like below

=HYPERLINK(CONCATENATE('Code Repository'!B20, "/browse/master/", C20, ";", 'Code Repository'!B21, "$", D20), "Link")

I don't want to this to happen. What I want is below

=HYPERLINK(CONCATENATE('Code Repository'!B2, "/browse/master/", C20, ";", 'Code Repository'!B3, "$", D20), "Link")

The B2 and B3 are constants. How do I achieve this ?

TechCrunch

Posted 2018-02-26T23:38:16.447

Reputation: 101

Possible duplicate of Excel formula - Absolute reference to cell

– bertieb – 2018-02-27T19:38:18.483

Answers

0

Should use $ before row number to keep it constant. The query will be below

 =HYPERLINK(CONCATENATE('Code Repository'!B$2, "/browse/master/", C4, ";", 'Code Repository'!B$3, "$", D4), "Link")

TechCrunch

Posted 2018-02-26T23:38:16.447

Reputation: 101