+ Reply to Thread
Results 1 to 13 of 13

Need formula! If "0", replace "0" with value from 1 across and 1 down

  1. #1
    Registered User
    Join Date
    11-16-2016
    Location
    New York, NY
    MS-Off Ver
    2013
    Posts
    4

    Need formula! If "0", replace "0" with value from 1 across and 1 down

    Hi All,

    The target is column B. I have 2 issues:

    1. Where the value is "0", I need to pull the value from the cell that is right 1 and down 1. I have done the first 3 manually.
    2. I need to be able to drag this formula down Column B without changing the other values that are not "0".

    I have tried a combination of IF and OFFSET formulas but still can't get it right.

    PLEASE HELP!

    Thank you in advance.

    Excel Question.jpg
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,468

    Re: Need formula! If "0", replace "0" with value from 1 across and 1 down

    Welcome to the forum!

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    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: Need formula! If "0", replace "0" with value from 1 across and 1 down

    Use this in C2, copied down:

    =IF(A2="Configurable","",IF(B2="0",LEFT(B3,SEARCH("-",B3)-1),LEFT(B2,SEARCH("-",B2)-1)))
    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

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

    Re: Need formula! If "0", replace "0" with value from 1 across and 1 down

    A little modification of Gleen formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    why? because search("-",B2) =#value if there is no "-"
    but maybe I'm wrong
    Last edited by sandy666; 11-16-2016 at 05:20 AM.

  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: Need formula! If "0", replace "0" with value from 1 across and 1 down

    Sandy, Unfortunately, you are wrong. If you check it, you will seen that mine returned the desired result, whereas yours did not...
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 11-16-2016 at 05:49 AM.

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

    Re: Need formula! If "0", replace "0" with value from 1 across and 1 down

    Ok, Gleen
    In case if cell next to simple has "-" it works
    I (bet) assumed parent = 6 (from picture) and source has "-" or not.

    It is never late to learn :D

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by sandy666; 11-16-2016 at 07:06 AM.

  7. #7
    Registered User
    Join Date
    11-16-2016
    Location
    New York, NY
    MS-Off Ver
    2013
    Posts
    4

    Re: Need formula! If "0", replace "0" with value from 1 across and 1 down

    Hi everyone, Thanks again for your help.

    I plugged in the formula suggested but unfortunately have not received the desired response.

    As per the moderators advice, I have attached a sample excel workbook. With the excel attached, it should be easier.

    Let me try to explain what I am looking to do:

    The desired outcome is to replace the highlighted blanks(ex. B14,B21,B34,B36) with the respective value shown in red font (ex. B2, B6, B12, etc).

    The formula must be dragged down the entire column without changing any of the other "simple" values (ex. B3,B4,B5)


    Background

    Maybe a little context will help. The configurable SKU is considered the parent. For example "78260" in column B is the parent sku. The simple SKUs in Column B are child variations of the parent. For example "78260-10" represents style 78260 in a size 10. "78260-11" represents style 78260 in a size 11 etc.
    Attached Files Attached Files

  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: Need formula! If "0", replace "0" with value from 1 across and 1 down

    Now you really have me confused. Please amend to show EXACTLY what your expected results are.

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Need formula! If "0", replace "0" with value from 1 across and 1 down

    Try like this in a couple manual steps...

    First remove the 0s
    Use Find/Replace on column B to remove the 0's and replace them with nothing.
    Make sure to check "Match entire cell contents" in the Find/Replace options.

    Now with those 0's removed, and those cells blank
    Highlight column B
    Press CTRL + G
    Click Special
    Select Blanks
    Click OK

    Press =
    Press Right Arrow
    Press Down Arrow
    Press CTRL + ENTER

  10. #10
    Registered User
    Join Date
    11-16-2016
    Location
    New York, NY
    MS-Off Ver
    2013
    Posts
    4

    Re: Need formula! If "0", replace "0" with value from 1 across and 1 down

    haha oh no! I have attached the workbook again. This time I have included the data as it currently is ("Current") and how I want it to look like ("Goal").

    Jonmo1, your idea sounds promising, i'm going to try it now!
    Attached Files Attached Files

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Need formula! If "0", replace "0" with value from 1 across and 1 down

    Given the new example, you're talking about blanks, not zeros.
    So you can skip the find/replace part...

  12. #12
    Registered User
    Join Date
    11-16-2016
    Location
    New York, NY
    MS-Off Ver
    2013
    Posts
    4

    Re: Need formula! If "0", replace "0" with value from 1 across and 1 down

    Jonmo1, omg it works! Thank you so much! On my first full day on this forum, I already see its tremendous value. I will try to pay it forward!

    Thanks guys!

  13. #13
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Need formula! If "0", replace "0" with value from 1 across and 1 down

    You're welcome.

+ 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] VBA help needed to remove all "/" then replace with "-" from cell "B3"and "B5"
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 02:11 PM
  2. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. Replies: 7
    Last Post: 05-13-2006, 05:02 PM
  6. [SOLVED] If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 AM
  7. Can you replace "TRUE" with " " in an exact formula?
    By Sweetetc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-10-2006, 09:15 AM
  8. [SOLVED] Replace "insert function" with "edit formula" button in fourmula b
    By 13brian in forum Excel General
    Replies: 0
    Last Post: 08-24-2005, 04:05 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