+ Reply to Thread
Results 1 to 20 of 20

Auto Select Cell Value

  1. #1
    Registered User
    Join Date
    08-28-2008
    Location
    Tulsa
    Posts
    41

    Auto Select Cell Value

    Thanks for all your help. Sorry about the double posting.

    I have 3 columns, A1, A2 and A3

    I would like A3 to show me the value of A1 unless there is a value in A2 then it would show the value of A2 instead.

    I would also like to change the text color to reflect which cell the value comes from.

    Any help would be appreciated.
    Last edited by lockye; 11-18-2008 at 06:00 PM. Reason: SOLVED

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372
    In A3 enter the formula

    =IF(ISBLANK(A2),A1,A2)

    For cell A3 use conditional formatting with IsFormula

    =$A$3=$A$1

    and make the conditional format blue text, for example.

    A3 will then be blue if the value is from A1, otherwise it will be the standard format.


    HTH

    teylyn

  3. #3
    Registered User
    Join Date
    08-28-2008
    Location
    Tulsa
    Posts
    41

    Formula

    What do i do if there is a formula in A1 or A2 to generate the quantities?

  4. #4
    Registered User
    Join Date
    08-28-2008
    Location
    Tulsa
    Posts
    41

    ISBLANK referencing a formula

    How do i use ISBLANK if there is a formula in the cell it is referencing?

    I have 2 columns A1 and A2 they get there quantities from a formula.

    I would like A3 to display A2 if it has a quantity and A1 if it does not,sometimes neither A1 or A2 will have quantities.


    Thanks for the help

  5. #5
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Hi,

    Try this formula

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-28-2008
    Location
    Tulsa
    Posts
    41

    No that's not working

    I get no error message, but the cell has no value until i delete the formula out of A2

    Formula A1 and A2 are summing information from a previous page.

    A1 =SUMIF(CHR!$D$17:$D$5000,C10,CHR!$K$17:$K$5000)
    A2 =SUMIF(CHR!$D$17:$D$5000,C10,CHR!$L$17:$L$5000)

    C10 contains an item code

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    You can try IF(ISNUMBER(.... instead of ISBLANK, then reverse your arguments.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372
    Hi,

    if A1 and A2 contain formulas, testing with ISBLANK() will only work if the formula returns a blank or empty string (""). If the formula returns a number, and the number is zero, ISBLANK() will not work, so you need to change the condition in your IF statement. Something like

    =IF(A2=0,A1,A2)

    should work

    cheers

    Teylyn

  9. #9
    Registered User
    Join Date
    08-28-2008
    Location
    Tulsa
    Posts
    41

    not working

    That does not seem to work if A1 is blank

  10. #10
    Registered User
    Join Date
    08-28-2008
    Location
    Tulsa
    Posts
    41
    i cant seem to get it to work

    =IF(ISNUMBER(A1),A2,A1)

    IF A1 is blank and there is a value in A2 i don't get anything

    If A1 has a value and A2 has a value i get A2 which is right.

    If A1 has a value but A2 does not, then again nothing

    It seems that both A1 and A2 have to have numbers in their cells

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Please Login or Register  to view this content.
    Is that what you want?

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    I would like A3 to display A2 if it has a quantity and A1 if it does not,sometimes neither A1 or A2 will have quantities.
    =if(a2<>"", a2, if(a1<>"", a1, ""))
    Entia non sunt multiplicanda sine necessitate

  13. #13
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372
    it does what you specified in your first post.

    I would like A3 to show me the value of A1 unless there is a value in A2 then it would show the value of A2 instead.
    Maybe you need to restate your requirements.

  14. #14
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    since

    A1 =SUMIF(CHR!$D$17:$D$5000,C10,CHR!$K$17:$K$5000) and
    A2 =SUMIF(CHR!$D$17:$D$5000,C10,CHR!$L$17:$L$5000)
    will return a 0 if nothing
    then
    =if( and( a1 =0, a2 = 0), 0, if( a2> 0, a2, a1))
    Last edited by martindwilson; 11-18-2008 at 05:09 PM.

  15. #15
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372
    You've started two threads about the same problem. Several people are jumping up and down to help you. Your contributions are not very helpful. You seem to think that you have a right to our time and efforts.

    I'm starting to get annoyed.
    Last edited by teylyn; 11-18-2008 at 05:09 PM.

  16. #16
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    this is teylyn >>>>>>>>
    and i agree

  17. #17
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372
    I'm not willing to help you any further. You've started another thread for the same subject.

    I'm not happy about being exploited.


  18. #18
    Registered User
    Join Date
    08-28-2008
    Location
    Tulsa
    Posts
    41
    I apologize, I started on thread yesterday and replied to it this morning.

    I started another today because for some reason later in the day i could not post to the previous one again.

  19. #19
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Threads merged.

    In fairness to lockye, the forum has had severe problems over the last two days.

  20. #20
    Registered User
    Join Date
    08-28-2008
    Location
    Tulsa
    Posts
    41
    I apologize, I started on thread yesterday and replied to it this morning.

    I started another today because for some reason later in the day i could not post to the previous one again.

+ 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