Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Adjacent Cell to Last Cell in a Row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tom - 27 Jun 2007 16:25 GMT
I am creating two columns where data is continually added.  In one
column I have units either lbs or kgs listed.  In the second column I
have a price. I want to create a formula that will pick the last entry
in the units column and depending on whether it was lbs or kgs
multiply the number in the cell beside it in a further calculation

lbs    3.34                          kg   5.67
kg     4.50                          lb    8.94
lbs    8.94                          kg   5.82
lbs    4.33                          lb    6.22
lbs    2.68
kg     7.48

In this case in the first example the formula would determine that kg
was the last entry and use 7.48 for further calculation.

In the second example the formula would determine that lb was the last
entry and use 6.22 and multiply by 2.2046 in a further calculation.

Thanks

Tom
Bob Umlas - 27 Jun 2007 16:33 GMT
If there are no gaps in the column you can use COUNTA(A:A) to get the row of
the last collumn, then INDEX of that column to get the item. Example:
=INDEX(A:A,COUNTA(A:A)) would pick up "kg", or INDEX(D:D,COUNTA(D:D)) would
pick up the "lb".
Then multiply as you wish.
Further example:
=IF(INDEX(A:A,COUNTA(A:A))="kg",INDEX(B:B,COUNTA(A:A)),INDEX(B:B,COUNTA(A:A))*2.2046)

>I am creating two columns where data is continually added.  In one
> column I have units either lbs or kgs listed.  In the second column I
[quoted text clipped - 18 lines]
>
> Tom

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.