+ Reply to Thread
Results 1 to 15 of 15

If statement

  1. #1
    Registered User
    Join Date
    10-02-2007
    Posts
    8

    If statement

    Hello i need some help with some code that i am putting into a spredsheet, the spreed sheet lists computer equipment.

    i have a collum that show if it has been installed

    =IF(I15, yes,(H7 = H7+1))

    I has a value of Yes when it has been installed and i need it to update H7 to show the number of items that have been installed but i can not get it to work is it possible to get this to work

    thxs for the help

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Welcome to excel forum

    Please read forum rules (rule 1) & use suitable thread titles

    A thread with the rules is available at the top of each forum or see link below for rules
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Is this what you mean?

    =IF(I15="yes",H7+1,H7)

    By the way please read the rule on posting and change the title of the question - thanks

    http://www.excelforum.com/showthread.php?t=613917
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Registered User
    Join Date
    10-02-2007
    Posts
    8
    thxs for the help sorry i read the rules just after i posted when i try and use the code i keep getting a error. thank you i have got it working now. is there a way to get it to work for all of H so when more items get added it will auto upadte the list

    thxs for the help
    Last edited by SpikeyUK; 10-02-2007 at 09:00 AM.

  5. #5
    Registered User
    Join Date
    10-02-2007
    Posts
    8
    i am still having a few problems with this in collom H7 i need it to show how many time Yes is showen to show how many items have been installed, but i cant get it to work.


    =IF(I15="yes",I7+1,I7)

    this was the only way i could get it to work to count one of the items H7 is where the end value is displayed in the table.


    =IF(I15:300="yes",I7+1,I7)

    when i tryed this it did not work i think i need sum insted of IF for this to work


    thxs for the help mike
    Last edited by SpikeyUK; 10-03-2007 at 04:01 AM.

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    I'm trying to understand exactly what you need, but is it this in H7?

    =IF(COUNTIF(I15:I30,"Yes")>0,I7+COUNTIF(I15:I30,"Yes"),I7)

    I15:I30 being the range where you want to count how many "Yes" 's and I7 is the quantity without the number of "Yes" 's added?

  7. #7
    Registered User
    Join Date
    10-02-2007
    Posts
    8
    thank you for your help i havenow got that part of it working so i am happy thxs :-)

  8. #8
    Registered User
    Join Date
    10-02-2007
    Posts
    8
    I am now trying to add a few more parts to the spreedsheat but i dont know if it is posible to do them.

    as before in Colum I i have the status of the item they are Pending,Installed, Pending Install, Lost.

    Is there a way to get a row with all the computer info in it to change colour to say Green when Installed is entered into Colum I

    thxs for the help

  9. #9
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Yes it is possible with Conditional Formating, but could you attach a zipped copy of you file, with exactly what you need and I'll have a look for you?

    To post a zipped example, go to “My Documents” or wherever you have your file stored, right-click and “Send to > Compressed file”, then attach this zipped file to your post.

  10. #10
    Registered User
    Join Date
    10-02-2007
    Posts
    8
    here is the file, thxs for the help
    Attached Files Attached Files

  11. #11
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    I'm using Excel 2003, but basically you need to go into Conditional formating and set it up like so.

    http://www.contextures.com/xlCondFormat01.html
    Attached Images Attached Images

  12. #12
    Registered User
    Join Date
    10-02-2007
    Posts
    8
    Quote Originally Posted by oldchippy
    I'm using Excel 2003, but basically you need to go into Conditional formating and set it up like so.

    http://www.contextures.com/xlCondFormat01.html
    not a problem i can save it in the older format

    i stared to add the diffrent contextures but it wont let me add more then 3, any idears

    thxs i have a read up on it as well
    Attached Files Attached Files
    Last edited by SpikeyUK; 10-03-2007 at 03:41 PM.

  13. #13
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    You can set more than 3 conditional formats with 2007

  14. #14
    Registered User
    Join Date
    10-02-2007
    Posts
    8
    Quote Originally Posted by oldchippy
    You can set more than 3 conditional formats with 2007

    ok thank you for the help, my olny problm is that i have 2007 but most people that will need to see the spreedsheet are on 2003 Conditional formating the only way of doing. Its not a big problem, the main thing i would like to do with the conditional formats and that is to use the date from when the stock came in and compare that to the date Actual date and say i it have been there for over 6 week then change the colour on it that way. its just a shame you can only have 3 conditional formats in a cell
    Last edited by SpikeyUK; 10-04-2007 at 03:46 AM.

  15. #15
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    It may be worth having a look at this link

    http://exceltips.vitalnews.com/Pages...l_Formats.html

+ 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