Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-07-2017, 09:34 AM
ArviLaanemets ArviLaanemets is offline Picking value from a certain cell under certain conditions Windows 8 Picking value from a certain cell under certain conditions Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

I don't have Excel available at home, so I can't see your file. and you did left out most important part of information - the structure of data on sheet quotes! So I have to explain how I would solve a task like this instead simple solution. I hope your Excel isn't older than version 2010.

1. All formulas are much simpler, when using Names and defined Tables. So
a) define cells B8 and C12 as names nDepositCurrency and nTradedPair;
b) define datarange on sheet quotes as table, p.e. tQuotes. NB! when defining table, you have to include column headers, and it will be easier to work with table, when column headers are single word. P.e. TradedPair, SomeOtherColumn, Course, ... And be sure that column TradedPair is leftmost one;

2. Define a Name nDirection = IF(LEFT(nTradedPair,3)=nDepositCurrency,1,0);

3. Define a Name nCourse = VLOOKUP(nTradedPair, tQuotes, COLUMN(tQuotes[[#Headers],[Course]]) - COLUMN(tQuotes[[#Headers],[TradedPair]]) +1,0)
(you can make it simpler when table column TradedPair is in column A)

3. I don't know the structure of table your formula goes into, but it looks like you have there some column with values you want to multiply or divide with course from sheet quotes. So let's assume you define this too as table. p.e. tData, and there is a column Values, and a column Results. Insert into any cell in column Results the formula
=[@Values]*IF(nDirection>0,nCourse,1/nCourse)
When there were no formulas in column Results, or the whole column had same formula in it before, the whole column is updated with new formula.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum with conditions xling Excel 2 08-15-2017 12:16 AM
Picking value from a certain cell under certain conditions Conditional Formatting if certain cell meet certain conditions bbutl027 Excel 1 11-25-2016 12:52 AM
Picking value from a certain cell under certain conditions Title bar in word and ecxel 2010 is not picking up greek file name of 2007 file danielle Word 4 12-03-2014 07:47 AM
Picking value from a certain cell under certain conditions 3 Conditions Laurie B. Excel 4 08-15-2011 10:27 PM
Page number picking up heading numbering?! Ulodesk Word 0 09-24-2009 01:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:06 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft