ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Urgent Cell location changes (https://www.excelbanter.com/excel-discussion-misc-queries/48194-urgent-cell-location-changes.html)

Trever B

Urgent Cell location changes
 
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


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
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Trever B" wrote in message
...
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




Lilliabeth


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


--
Lilliabeth
------------------------------------------------------------------------
Lilliabeth's Profile: http://www.excelforum.com/member.php...o&userid=27741
View this thread: http://www.excelforum.com/showthread...hreadid=472488



All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com