View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Terry Pinnell[_4_] Terry Pinnell[_4_] is offline
external usenet poster
 
Posts: 192
Default Selec same row different column?

GS wrote:

I use local scope (sheet level) col-absolute/row-relative defined names
for this. For example...

A1: Qty; B1: Item ID; C1: Description; D1: Unit Price; E1: Amount

..and I select A1 and define names as follows...

Name: sheet1!Qty RefersTo: =$A1
Name: sheet1!ItemID RefersTo: =$B1
Name: sheet1!Descr RefersTo: =$C1
Name: sheet1!UnitPrice RefersTo: =$D1
Name: sheet1!Amount RefersTo: =$E1

..where cols A:D are not locked, the sheet is protected.

The 'Amount' col gets the following formula:
=IF(UnitPrice<"",ROUND(UnitPrice*Qty,2),"")
Used in row 2: =IF($D2<"",ROUND($D2*$A2),2),"")
Used in row 9: =IF($D9<"",ROUND($D9*$A9),2),"")

The 'Description' col gets the folowing formula:
=IF(ItemID="","",VLOOKUP(ItemID,PriceList,Descript ion,FALSE))

The 'Unit Price' col gets the following formula:
=IF(OR(ItemID="",Qty=""),"",VLOOKUP(ItemID,PriceLi st,Price,FALSE))

HTH


I've just realised that the intuitive keystrokes Home ArrowRight
ArrowRight also do it!

--
Terry, East Grinstead, UK