+ Reply to Thread
Results 1 to 9 of 9

Want to write a new formula that is based upon an existing formula

  1. #1
    Registered User
    Join Date
    03-12-2014
    Location
    ATLANTA GA USA
    MS-Off Ver
    Excel 2013
    Posts
    35

    Want to write a new formula that is based upon an existing formula

    I have a file (FILE1) that has last-name (Col A), first-name (Col B), address (Col C).

    I have a second file (FILE2) that is linked to FILE1 only in Col A.


    Problem: Working only with FILE2, can a formula be written for Col B (first-name) and Col C (address) that is based off of the formula in Col A?? Sort of like asking if you can take the formula in FILE2 cell A1 and "change the A into a B" to get the first-name to populate in cell B1 ... and "change the A into a C" to get the address to populate in cell C1.

    Thanks for your help!
    Frank

    P.S. couldn't get the files to attach??? so here's the issue in simplicity

    FILE1:
    COL A COL B COL C

    SMITH BUD 228 MORING ST
    JONES ANN 575 WATERS AVE
    MAYES MAY 989 PALM CT



    FILE2:
    COL A COL B COL C

    ='FILE1'!$A$1 ? ?
    ='FILE1'!$A$2 ? ?
    ='FILE1'!$A$3 ? ?

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,832

    Re: Want to write a new formula that is based upon an existing formula

    Is it necessary to have the references absolute, or can you change the cell references to A$1 or A1? If you can take the $ off of the A, then you can simply copy the formula across.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    03-12-2014
    Location
    ATLANTA GA USA
    MS-Off Ver
    Excel 2013
    Posts
    35

    Re: Want to write a new formula that is based upon an existing formula

    First, no it does not have to be an absolute. Second, I know I can write a link to FILE1 for Col B and Col C formulas ... BUT is there a way to use the formula in Col A ('FILE1'!$A$1) to write a formula for Col B that says something like: =A1+ADD 1 Column ... (silly but the idea of saying =A1 and then add some formula text is what I'm trying to get to here). Thx!

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,832

    Re: Want to write a new formula that is based upon an existing formula

    The OFFSET() function will do that https://support.office.com/en-us/art...e-b4d906d11b66
    I'm not sure if the OFFSET() function is limited to open workbooks like the INDIRECT() function is. If you want to be able to close File1, then you will want to test to make sure it works as expected with the closed workbook.

    I often use other lookup functions (like VLOOKUP()) for this sort of thing, too.

  5. #5
    Registered User
    Join Date
    03-12-2014
    Location
    ATLANTA GA USA
    MS-Off Ver
    Excel 2013
    Posts
    35

    Re: Want to write a new formula that is based upon an existing formula

    Thank you for that lead MrShorty! I appreciate the help!

    Frank

  6. #6
    Registered User
    Join Date
    03-12-2014
    Location
    ATLANTA GA USA
    MS-Off Ver
    Excel 2013
    Posts
    35

    Re: Want to write a new formula that is based upon an existing formula

    Unfortunately, the OFFSET function requires the other file to be open in order for it to work. It worked as I was hoping but won't work for me here .... I have 1000+ files that would need to stay open at all times. Plan B .. ???!

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,832

    Re: Want to write a new formula that is based upon an existing formula

    I have suggested 3 possible approaches. A simple, copyable, relative reference formula, the OFFSET() function, and some combination of Excel's lookup functions. You have rejected the first 2, so I guess we are looking at lookup functions. Are you familiar with these?

    Help file for the VLOOKUP() function. https://support.office.com/en-us/art...8-93a18ad188a1 We don't usually put formulas in for the 3rd argument, but you would simply need a formula (COLUMN() function, maybe, or similar) to tell the lookup function which column to return. If your database is large, we probably want to use INDEX() and MATCH() (separately) to avoid duplicating the lookup effort.

  8. #8
    Registered User
    Join Date
    03-12-2014
    Location
    ATLANTA GA USA
    MS-Off Ver
    Excel 2013
    Posts
    35

    Re: Want to write a new formula that is based upon an existing formula

    Again, thank you MrShorty. I will research the vlookup link that you have provided as soon as I can. Thank you!

  9. #9
    Registered User
    Join Date
    03-12-2014
    Location
    ATLANTA GA USA
    MS-Off Ver
    Excel 2013
    Posts
    35

    Re: Want to write a new formula that is based upon an existing formula

    MrShorty, the VLOOKUP function worked. Files don't need to be open and it updated the sheet as needed. Thank you for your help! Great suggestions!!

+ 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: 3
    Last Post: 01-13-2016, 12:05 PM
  2. Need to write a formula based on fontcolor of cel and cell color
    By atzerv in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-18-2014, 04:25 PM
  3. Replies: 0
    Last Post: 03-13-2013, 12:25 PM
  4. apply existing List, if formula is true, otherwise write text data in cell
    By Lynn Porter in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-07-2013, 08:03 PM
  5. [SOLVED] Formula to write multiple values to a cell based on value of other cells
    By crazyjockey in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-05-2012, 09:32 PM
  6. Replies: 4
    Last Post: 09-06-2012, 12:04 PM
  7. Should I be able to write formula based on drop down box values?
    By michellecairns in forum Excel General
    Replies: 1
    Last Post: 11-23-2011, 11:57 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