Possible to keep a portion of formulas intact while dragging?

Jennifre

Board Regular
Joined
Jan 11, 2011
Messages
160
I know [basically/kind of] about using the $s to either keep rows or columns either intact or to change number as you drag.

However I need to keep whole portions of certain formulas intact as I drag -- is that possible using any characters or... something like that?

Example:
=SUMPRODUCT(--(($DG2:$DG1364=1111)),--(($DT2:$DT1364=5)+($DT2:$DT1364=6)))

I'd like to be able to drag this both ways, down and across, keeping various pieces of it intact as I drag in each direction.

Dragging down, I need to keep this intact/unchanging:
(($DT2:$DT1364=5)+($DT2:$DT1364=6))

Dragging across, I need to keep this intact/unchanging:
(($DG2:$DG1364=1111))

I've just been updating each row or column after dragging one way or the other, though I'm wondering if there is an easier way??

Thanks so much!!!!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Jen

it looks like you are only aware of locking a cell reference by using the dollar sign ahead of the column reference, that will lock the column reference and not the row reference, you can use the F4 key to toggle between different ways to lock your references, if you want the cell reference to be absolutely locked in all directions you should have the dollar sign in front of both the cell reference and the row reference as well.

I hope this helps.
 
Upvote 0
You can write a script loop that will add your formula based on column or row data. With 2 loops, you would beable to name cell values based on the critera you describe.

Is that something you need assitance with?
 
Upvote 0
Excel Workbook
BCDEFGHIJ
14Lock in All Directions
15pop1pop1pop1pop1
16pop1goes1the1weasel1pop1pop1pop1pop1
17pop2goes2the2weasel2Lock on the Row only
18pop3goes3the3weasel3pop1goes1the1weasel1
19pop4goes4the4weasel4pop1goes1the1weasel1
20pop5goes5the5weasel5Locked on the column only
21pop6goes6the6weasel6pop6pop6pop6pop6
22pop7goes7the7weasel7pop7pop7pop7pop7
Sheet1
Excel Workbook
G
18pop1
Sheet1
Excel Workbook
G
21pop6
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

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