+ Reply to Thread
Results 1 to 7 of 7

Adjust formula with blanks/no blanks

  1. #1
    Registered User
    Join Date
    12-01-2023
    Location
    San Francisco, CA
    MS-Off Ver
    16.79
    Posts
    10

    Adjust formula with blanks/no blanks

    Hi, I'm trying to figure out how to adjust for blank cells when running calculations. In my example, you'll see that for column H, I want to adjust the figures in column G so that, if a country doesn't have a percent (column F), it pulls from the income classification that the country is considered.

    For example, I want Andorra - row 6 to show the amount in D6*B22, since it is considered a high-income country.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,748

    Re: Adjust formula with blanks/no blanks

    does this work for you
    =IF(F2=0,INDEX($B$22:$B$26,MATCH(C2,$A$22:$A$26,0)),F2*D2)
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: Adjust formula with blanks/no blanks

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Adjust formula with blanks/no blanks

    Could use this formula with named table.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-01-2023
    Location
    San Francisco, CA
    MS-Off Ver
    16.79
    Posts
    10

    Re: Adjust formula with blanks/no blanks

    Hi! It's almost there. I don't want it to return the value located in B22-B26 but instead I want it to use that as the multiplier. So right now for Andorra it's returning .84 which is the rate for high-income countries. But I want it to do that times the value in column D. So again for Andorra .84*1691.

    Does that make sense?

  6. #6
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Adjust formula with blanks/no blanks

    This is what my formula does.

    Excel 365 (Windows) 64 bit
    A
    B
    C
    D
    E
    F
    G
    H
    1
    Countries Code 1 2 3 4 5 6
    2
    Afghanistan AFG Low income
    1234137
    0%
    1%
    13.081,85
    13.081,85
    3
    Albania ALB Upper middle income
    83227
    69%
    69%
    57.621,55
    57.621,55
    4
    Algeria DZA Lower middle income
    988272
    0%
    79%
    781.466,18
    781.466,18
    5
    American Samoa ASM High income
    2327
    0%
    68%
    1.591,50
    1.591,50
    6
    Andorra AND High income
    1691
    0%
    0%
    -
    1.416,99
    7
    Angola AGO Lower middle income
    2334213,5
    0%
    40%
    924.605,76
    924.605,76
    8
    Antigua and Barbuda ATG High income
    2104,5
    0%
    70%
    1.478,49
    1.478,49
    9
    Argentina ARG Upper middle income
    1988442,5
    0%
    76%
    1.514.927,79
    1.514.927,79
    10
    Armenia ARM Upper middle income
    109181
    29%
    29%
    31.427,50
    31.427,50
    11
    Aruba ABW High income
    2112,5
    0%
    104%
    2.186,88
    2.186,88
    12
    Australia AUS High income
    618596,5
    0%
    160%
    991.080,58
    991.080,58
    13
    Austria AUT High income
    258173
    0%
    103%
    265.549,36
    265.549,36
    14
    Azerbaijan AZE Upper middle income
    421042
    46%
    46%
    194.898,61
    194.898,61
    15
    Bahamas, The BHS High income
    9258
    0%
    40%
    3.679,08
    3.679,08
    16
    Bahrain BHR High income
    58957
    0%
    53%
    31.013,17
    31.013,17
    17
    Bangladesh BGD Lower middle income
    8772784,5
    36%
    36%
    3.191.599,33
    3.191.599,33
    18
    Barbados BRB High income
    6023
    75%
    75%
    4.524,88
    4.524,88
    19
    Belarus BLR Upper middle income
    277425
    97%
    97%
    268.453,98
    268.453,98
    Sheet: Sheet2

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,748

    Re: Adjust formula with blanks/no blanks

    sorry about that - I overlooked that
    how about
    =IF(F2=0,D2*INDEX($B$22:$B$26,MATCH(C2,$A$22:$A$26,0)),F2*D2)
    Attached Files Attached Files

+ 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] Multiple Conditions based on blanks/non-blanks and dates
    By clari55a in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-01-2021, 10:31 AM
  2. Replies: 1
    Last Post: 08-06-2019, 10:43 PM
  3. [SOLVED] Formula to count blanks and non-blanks with a dynamic range
    By brittdyer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-12-2018, 07:45 AM
  4. BLANKS (Not Really Blanks) AND Rearrange ignoring blanks
    By shivspatil in forum Excel General
    Replies: 4
    Last Post: 02-02-2018, 08:28 AM
  5. VBA code finds blanks, but how to write VBA to ignore non blanks?
    By hopegriffin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2016, 10:51 AM
  6. [SOLVED] How to convert a horizontal vector with blanks into a vertical one without blanks
    By luv2glyd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2014, 02:55 PM
  7. [SOLVED] Paste Special Skip Blanks not skipping blanks, but overwriting...
    By gsrosin in forum Excel General
    Replies: 0
    Last Post: 02-22-2005, 12:06 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