+ Reply to Thread
Results 1 to 21 of 21

Can an “If statement” be setup to return a numerical value from a cell but not the formula

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Can an “If statement” be setup to return a numerical value from a cell but not the formula

    This spreadsheet has rows with just numerical data in the cells. Many of the cells are blank. Sometimes the data in one cell is identical to the cell immediately above it. These are called repeaters. At the end of each row there is a cell where I manually input the number of repeaters in that row. The next cell after that cell calculates the average of the rows that have repeaters in them from the top of the column to the current cell. I am not calculating the number of repeaters, just the percentage of rows that have repeaters in them. I use this formula for that;
    IF(BQ976>0,COUNT(BQ$976: BQ976)/(COUNT(BQ$976: BQ976)+COUNTBLANK(BQ$976: BQ976)),"")
    When I drag this formula down the column, BQ976:BQ1009, it indexes automatically so it calculates the percentage for each row from the top of this column to the bottom as the data is input. The last cell in that column, BQ1010, calculates the average of the averages from BQ976 to BQ1009. It is this cell, BQ1010, which is giving me problems.
    The data rows are 61 columns wide, G976:BO976. I want to automatically mirror a parallel row from BR976 to DZ976, but instead of entering the data from G976:BO976, I want to enter the average of the averages from BQ1010 in each mirrored cell. So if BQ1010 has a displayed value of 0.71 and G976 has numerical data in it, then I want BR976 to have the value 0.71 not the formula from BQ1010. I have been using this formula, IF(G976>0,$BR$1010,"") by placing it in BR976 and dragging it across to DZ976. The G976 indexes so any cell in G976:BO976 that has data in it gets 0.71 in its mirror in BR976:DZ976. That is what I want. The problem is that when I enter data in the next row G977:BO977, BQ1010 changes and the 0.71 changes in the first row because my formula enters the formula from BQ1010. I need the 0.71 to remain fixed in the first row. How do I do that?

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    Hi AlbusD,

    welcome to the forum.

    Can you upload a sample workbook along with your expected results ? Thanks.




    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    I guess that I don't know how to post a sample. I just tried to copy and paste my spreadsheet in this space, but it made an unreadable mess that I had to erase. How do I post a spreadsheet page? Thank you very very much for your effort and patience.
    Last edited by AlbusD; 04-05-2013 at 08:22 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    04-05-2013
    Location
    dublin, Ireland
    MS-Off Ver
    Excel 2007/10
    Posts
    26

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    deleted post

  6. #6
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    This is going to take me awhile. I just need to upload one page out of a workbook that has many pages. The whole book is almost 8 megs. I just tried to copy and paste the single page into a new workbook but it lost all its formatting so I will fix that and try again.

  7. #7
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    Here it is. I hope this works!!
    Attached Files Attached Files

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    okay... I can see that workbook is uploaded. Now where to look into .. i.e., which cell ? Also mention your expected output. thanks.



    Regards,
    DILIPandey
    <click on below * if this helps>

  9. #9
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    Good, we are making progress. Row 3 on that spreadsheet explains the problem. Row 3's row height must be set to 45 as there are 3 lines of text. I find that it collapses down to less than that and hides the explanation of the problem. If you need a better explanation please ask. Thank you for your effort.

    P.S. You must also pan to the right on your monitor as the spread sheet is very wide and extends beyond most screens.
    Last edited by AlbusD; 04-06-2013 at 09:43 AM.

  10. #10
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    HI AlbusD,

    I am confused... you question is regarding an IF statement or regarding accommodating 3 rows in a single row with necessary expansion ?


    Regards,
    DILIPandey
    <click on below * if this helps>

  11. #11
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    In your last post you said, "okay... I can see that workbook is uploaded. Now where to look into .. i.e., which cell ? Also mention your expected output. thanks." In response to that question I pointed out that in row three of the posted workbook page there is a text explanation of the problem. It may be that you can't see that explanation if you don't make row 3 high enough to see the three consecutive line of text there. You may have to also scan to the right of the page if your monitor is not wide enough to see the entire width of the page. Mine is not. Thank you for trying to help. I think that we can get this solved if we keep talking back and forth.

  12. #12
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    In your last post you said, "okay... I can see that workbook is uploaded. Now where to look into .. i.e., which cell ? Also mention your expected output. thanks." In response to that question I pointed out that in row three of the posted workbook page there is a text explanation of the problem. It may be that you can't see that explanation if you don't make row 3 high enough to see the three consecutive line of text there. You may have to also scan to the right of the page if your monitor is not wide enough to see the entire width of the page. Mine is not. Thank you for trying to help. I think that we can get this solved if we keep talking back and forth.

  13. #13
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    Okay.. found following in the workbook :-
    All of the cells in this field have 0.68 in them. That is wrong because my IF statement transfers the formula not just the numerical value to this field. The first two rows should be blank because AO34 was blank when the data was put into those rows. They were blank until data was added in the rows below them. I need the values to remain the same as they were when they were put in and not update when data is added below them. How do I fix this?
    you want all cells to have value from AO34 cell but their value should not be changed when AO34 will have new value.. correct ?
    If this is the case you need to go for macro as any formula will be formula only and will keep on getting new values from AO34 as and when it changes.

    Let me know if I am correct in my understanding... thx



    Regards,
    DILIPandey
    <click on below * if this helps>

  14. #14
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    Yes, you are correct. Can a macro be written that will execute automatically when I put in new data? I would need help writing that macro.

  15. #15
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    Okay.. so with every change in AO34, you need entire data on the right side table to be refreshed OR some specific range to be refreshed ? thanks.


    Regards,
    DILIPandey
    <click on below * if this helps>

  16. #16
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    I don't want the entire range to change. I only want the the row that is on the same date line to have the values of AO34 put in. I was hoping that instead of transferring the formula to the right side of the sheet that only the value of AO34 would be placed on the right side of the sheet. After the value of AO34 is placed on the right of the sheet I never want it to change. Is that possible?

  17. #17
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,290

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    is this what you want?
    Attached Files Attached Files
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  18. #18
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    This is a good solution. Thank you very much for you help!! There is nothing wrong with your English, it's just fine. I have learned a lot form this thread, Thank you again.

  19. #19
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,290

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    There is nothing wrong with your English, it's just fine
    Thanks for the compliment.

    Have you also seen that I changed the formulas in columns AM and AO?

  20. #20
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    No, I missed the changes to AM and AO, I am looking at them now. I am going to have to think about what I see. I am not the skilled programmer that you are. I can see that it works real well. I just don't see why yet. I may have to get back to you if I can't figure it out. Thank you. This is great!!

  21. #21
    Registered User
    Join Date
    04-04-2013
    Location
    Kent, Washington
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Can an “If statement” be setup to return a numerical value from a cell but not the for

    I really like the new formula in column AO. It's cleaner and simpler than mine. I don't understand the new formula in column AM. I know that it works, but I don't know how it works. Can you help me understand it?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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