# Posts by danielsto

I'm trying to move two cells down while the cells are still selected.

Code
``Range(Selection, Selection.End(xlUp)).Select``

This selects all the cells to A1, but I want to end at A3. I've tried to

Code
``ActiveCell.Offset(2,0).Select``

. This takes me to A3, but it makes me lose my cell selection.

I hope my problem is understandable.

Re: Is it possible to change formula range, without changing the contents?

Thank you for all you help!

Re: Is it possible to change formula range, without changing the contents?

I'm sorry, i wrote the formula in wrong language!
It should be =SUMIF(F\$8:F\$26;"a31";G\$8:G\$26).

Re: Is it possible to change formula range, without changing the contents?

Ok, now i have added a dummie of the file.
In cell G31, i want to sum all the hours posted by TW.
The formula =SUMMERHVIS(F\$8:F\$26;"a31";G\$8:G\$26), doesn't sum this for me.

## Files

Re: Is it possible to change formula range, without changing the contents?

Ok, I see. Instead of "LY" I put "A31", '=SUMIF(F7:F18,A31,G7:G18)'
But when I for example put "LY" on
F8 and "9" on G8, the formula dosent match "LY" with "A31". So i do get "0" instead of "9".
Something i do wrong?

Re: Is it possible to change formula range, without changing the contents?

Yes, i have all the initials in a column on the left, but i dont know how to refer to them with this formula. Is that possible?

I'm using the formula =SUMIF(F18:F18,"LY",G18:G18), =SUMIF(F18:F18,"KT",G18:G18), and so on.
I want to change the range to:
=SUMIF(F7:F18,"LY",G7:G18), =SUMIF(F7:F18,"KT",G7:G18), and so on.

I can do it manually, but it's 20 rows.

Is there a way where i can change the formula range on the first and copy it down, without also copying the initials, (etc. "LY") ?

Re: How to copy the formula by row and not by column

Thank you very much, work perfect!
could you explain what "column()" means?

I want to link the sums from one sheet to another.

In the first sheet the sums are in the rows. I want to link them so when i copy my formulas through columns in the first sheet it refers to the rows in second sheet.

I've been trying this on cell L6, ='sheet2'!T31
Now i want cell M6 to be ='sheet2'!T32. But when i copy, it becomes U31.

I see the logic in why my formula dosent work, but i dont know how to fix it.