+ Reply to Thread
Results 1 to 8 of 8

making a formula but a cell is reffered to an other cell

  1. #1
    Registered User
    Join Date
    01-07-2023
    Location
    amsterdam
    MS-Off Ver
    365
    Posts
    3

    making a formula but a cell is reffered to an other cell

    Hello!

    i have a complicated problem writing a formula in a document.
    it goes like this:

    say that i buy and sell items for instance~
    so i have some sort of profit right?

    sell price - buy price = profit.

    OK, clear.

    now i buy an item, BUT i trade it for another item. and the traded item i sell later on.
    then i have this as the following: buy price - trade - sell price. And for this i want to make a formula.

    I hope this is an clear and simple example. Now lets take a look at this in excel.
    this is what i have in the document:

    inkoop verkoop winst

    deurmat 10 32 ? 22,00
    hobbelpaard 40 30 -? 10,00
    sjonnie 100 100 ? 0,00
    dobbelstenen 50 trade nvm
    beker =f6 75 #WAARDE!

    See what i mean? i want to calculate the profit for the "beker" but the beker was traded for dobbelstenen. so naturally i use the buy price from the dobbelstenen. and writing that formula is a headache.
    The formula i want to write must see that the buy price is traded. then it needs to search what row that is and find the buy price from that row.

    in the xlsx map is the docu. If someone could write it in there my life would be complete.

    thx in advance
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-07-2023
    Location
    amsterdam
    MS-Off Ver
    365
    Posts
    3

    making a formula but a cell is reffered to an other cell

    this formula is very close to what i mean
    =IF(F3="trade","nvm",IF(D3="trade",IF(F3>0,F3-LOOKUP(2,1/($F2:F$3="trade"),$D2:D$3),""),IF(F3>0,F3-D3,"")))

    in the 2nd document is the last issue with the formula.
    if here is an answer for life would be fulfilled.

    thx.


    Hello!

    i have a complicated problem writing a formula in a document.
    it goes like this:

    say that i buy and sell items for instance~
    so i have some sort of profit right?

    sell price - buy price = profit.

    OK, clear.

    now i buy an item, BUT i trade it for another item. and the traded item i sell later on.
    then i have this as the following: buy price - trade - sell price. And for this i want to make a formula.

    I hope this is an clear and simple example. Now lets take a look at this in excel.
    this is what i have in the document:

    inkoop verkoop winst

    deurmat 10 32 ? 22,00
    hobbelpaard 40 30 -? 10,00
    sjonnie 100 100 ? 0,00
    dobbelstenen 50 trade nvm
    beker =f6 75 #WAARDE!

    See what i mean? i want to calculate the profit for the "beker" but the beker was traded for dobbelstenen. so naturally i use the buy price from the dobbelstenen. and writing that formula is a headache.
    The formula i want to write must see that the buy price is traded. then it needs to search what row that is and find the buy price from that row.

    in the xlsx map is the docu. If someone could write it in there my life would be complete.

    thx in advance
    Attached Files Attached Files
    Last edited by ikhebeenformuleprobl; 01-08-2023 at 11:08 AM. Reason: almost solved

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,163

    Re: making a formula but a cell is reffered to an other cell

    Try

    in H3

    =IF(F3="trade","nvm",IF(D3="trade",IF(F3>0,F3-LOOKUP(2,1/($F2:F$3="trade"),$D2:D$3),""),IF(F3>0,F3-D3,"")))

    Copy down
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: making a formula but a cell is reffered to an other cell

    Something simalar,

    Please try in H3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: making a formula but a cell is reffered to an other cell

    Will your real data contain more than ONE pair of "trade"? For example, if the two black rows were not there. If so... how can you link the buying part of a trade with is correct selling part?

    You may need to rethink this. You may need a more realistic sample sheet.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  6. #6
    Registered User
    Join Date
    01-07-2023
    Location
    amsterdam
    MS-Off Ver
    365
    Posts
    3

    Re: making a formula but a cell is reffered to an other cell

    this is exactly what i mean.
    i editted the post because there is one final issue.
    in the 2nd docu is the final issue.

    thx in advance, im already deeply satisfied

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,163

    Re: making a formula but a cell is reffered to an other cell

    Why ? looking at the "logic" of consecutive trades then E18 should be 100 ??? Are consecutive trades in "C" to match consecutive trades in "A" i.e C15 with A18 / C16 with A19 ?? If not, how do we match the trades?

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: making a formula but a cell is reffered to an other cell

    Please take a moment to READ the forum rules that you agreed to adhere to. Especially Rule 5.

    https://www.excelforum.com/forum-rul...rum-rules.html

    I have merged the two threads into one.

    Please DO NOT duplicate threads again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 11-07-2018, 05:48 PM
  2. [SOLVED] Making a cell display 100.0% based upon another cell with a formula
    By OverKnight in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2018, 04:12 PM
  3. making one cell's value change another cell's formula
    By f0007c3 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-30-2014, 12:16 PM
  4. Need Help making the formula in a Cell Constant
    By balu.soln4biz in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 06-05-2014, 05:14 PM
  5. Would This Be Possible? Making a cell exempt from sum formula.
    By gorinw10 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-13-2013, 01:58 PM
  6. [SOLVED] Finding the row reffered to by a lookup
    By Odlanier in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2013, 06:33 AM
  7. Making a cell with a formula appear empty
    By macaonghus in forum Excel General
    Replies: 5
    Last Post: 03-16-2009, 08:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1