+ Reply to Thread
Results 1 to 6 of 6

Adding an IF function to the current formula?

  1. #1
    Registered User
    Join Date
    07-27-2022
    Location
    Colorado, USA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    32

    Adding an IF function to the current formula?

    I am using the current formula to automatically find value for a particular name and add them together to find the average. =(VLOOKUP(A1,Sheet1!A:D,4,0)+INDEX(Sheet2!D:D,MATCH(A1,Sheet2!A:A,0)))/2

    This final number gets imported to the sheet titled "Combined"

    When the name being looked up is present in both sheet 1 and sheet 2, this formula works flawlessly. The issue I have is not every name appears in both sheets. This returns a value of #N/A. I am wondering if there is another function that could be added so that if the name only appears in either sheet 1 or sheet 2, but not both, the formula would simply return the value in the sheet where the name does appear. If the name does not appear in either sheet, I am ok with it returning #N/A as I can easily filter those out of the workbook.

    I have attached the worksheet for reference. Thanks in advance!
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Adding an IF function to the current formula?

    is this what you want?
    Column1 Column2 Column3 AVG
    Aaron Gordon DEN DEN
    13
    Aaron Holiday ATL ATL
    9.3
    Al Horford BOS BOS
    12.4
    Anfernee Simons POR POR
    22.45
    Anthony Edwards MIN MIN
    22.45
    Ayo Dosunmu CHI CHI
    19.3
    Bennedict Mathurin IND IND
    22.1
    Bojan Bogdanovic DET DET
    15.3
    Bradley Beal WAS WAS
    21.6
    Brook Lopez MIL MIL
    13.2
    Buddy Hield IND IND
    15.55
    Cade Cunningham DET DET
    16.9
    Cam Reddish NY NY
    10.2
    Cameron Johnson PHO PHO
    15.3
    Anthony Davis LAL LAL
    22.2

  3. #3
    Registered User
    Join Date
    07-27-2022
    Location
    Colorado, USA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    32

    Re: Adding an IF function to the current formula?

    Yes that is correct. I just realized it did not include the actual name I am needing help with, so I have updated the workbook to include more detail below.

    I have highlighted a name under the combined tab. This name appears in sheet 2 but not in sheet 1. it is still #N/A but what I'd like is for the formula to pull in data that is present is sheet 2 but not in sheet 1 as well.

    What you provided is exactly what I need, I just need to make sure the formula pulls in names and data present in sheet 2 but not in sheet 1 as well.

    Hope this makes sense.
    Attached Files Attached Files

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Adding an IF function to the current formula?

    like this?
    Column1 Column2 Column3 AVG
    Aaron Gordon DEN DEN
    13
    Aaron Gordon DEN DEN
    13
    Aaron Holiday ATL ATL
    #N/A
    Aaron Holiday ATL ATL
    9.3
    Al Horford BOS BOS
    #N/A
    Al Horford BOS BOS
    12.4
    Anfernee Simons POR POR
    22.45
    Anfernee Simons POR POR
    22.45
    Anthony Davis LAL LAL
    #N/A
    Anthony Davis LAL LAL
    22.2
    Anthony Edwards MIN MIN
    22.45
    Anthony Edwards MIN MIN
    22.45
    Ayo Dosunmu CHI CHI
    #N/A
    Ayo Dosunmu CHI CHI
    19.3
    Bennedict Mathurin IND IND
    #N/A
    Bennedict Mathurin IND IND
    22.1
    Bojan Bogdanovic DET DET
    #N/A
    Bojan Bogdanovic DET DET
    15.3
    Bradley Beal WAS WAS
    21.6
    Bradley Beal WAS WAS
    21.6
    Brook Lopez MIL MIL
    #N/A
    Brook Lopez MIL MIL
    13.2
    Buddy Hield IND IND
    15.55
    Buddy Hield IND IND
    15.55
    Cade Cunningham DET DET
    16.9
    Cade Cunningham DET DET
    16.9
    Cam Reddish NY NY
    #N/A
    Cam Reddish NY NY
    10.2
    Cameron Johnson PHO PHO
    #N/A
    Cameron Johnson PHO PHO
    15.3
    Last edited by sandy666; 10-29-2022 at 11:55 AM.

  5. #5
    Registered User
    Join Date
    07-27-2022
    Location
    Colorado, USA
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    32

    Re: Adding an IF function to the current formula?

    Yes that is the result I am looking for. What formula did you use to obtain that?

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Adding an IF function to the current formula?

    this is not a formula but Power Query, simple and fast

    Please Login or Register  to view this content.

+ 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. [SOLVED] Adding If Function To my current Code
    By SteynfaardtD in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2019, 03:03 PM
  2. Periodically adding additional text to current formula
    By HCornelian1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-09-2017, 09:28 AM
  3. [SOLVED] Adding a new Condition to a current Formula
    By hammer2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-17-2015, 04:36 PM
  4. Adding a IF function to a current formula
    By lcartwright in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-16-2015, 02:21 AM
  5. adding Indirect formula to my current sum if array formula
    By Eastbay2 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-13-2013, 09:41 AM
  6. adding current date then after saving the file current date function stops
    By gotbitey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2011, 02:15 PM
  7. Adding WEEKDAY to current formula
    By edwardpestian in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-06-2006, 11:19 PM

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