Urgent Cell location changes

T

Trever B

I have cells that look like this


Line U
1 Qty - L
2 =IF((E2)=RIGHT(U1,1),D2,0)
3 =IF((E3)=RIGHT(U1,1),D3,0)
4 =IF((E4)=RIGHT(U1,1),D4,0)

When I update data to the left of the colums with a macro they change to:-

Line U
1 Qty - L
2 =IF((E2)=RIGHT(U2,1),D2,0)
3 =IF((E3)=RIGHT(U3,1),D3,0)
4 =IF((E4)=RIGHT(U4,1),D4,0)

How do I stop the cell location changing and to remain at U1
 
M

Max

How do I stop the cell location changing and to remain at U1

Try in U2: =IF(E2=RIGHT(INDIRECT("U1"),1),D2,0)
Copy U2 down
 
L

Lilliabeth

I am not entirely certain I understand the question, but do you just
need to reference $U$1 instead of U1?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top