+ Reply to Thread
Results 1 to 10 of 10

if function. Value if true. Do nothing. How?

  1. #1
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    317

    if function. Value if true. Do nothing. How?

    Hi Guys

    I am entering a column. I want to use the"if" function. For my "value if true" I want to leave the contents as they are. I am sure there is a solution for his but can’t find it.

    Please Login or Register  to view this content.
    Mark

  2. #2
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: if function. Value if true. Do nothing. How?

    Assuming this is a cell formula you want, try this;
    =If(P74="petty cash","petty cash",0)

    The formula is designed to return the word PETTY CASH if P74 contains the word PETTY CASH, otherwise the formula will return a vlaue of zero.

    If you want the formula to go the other way, then try this;
    =If(P74="petty cash","","Petty cash")
    Last edited by Jim885; 11-27-2013 at 09:01 AM.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: if function. Value if true. Do nothing. How?

    You can use the code as below.....
    Please Login or Register  to view this content.
    Hope that gives you an idea.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    317

    Re: if function. Value if true. Do nothing. How?

    Hi Sktneer

    Well the expression "do nothing" actually exists. I think what you have is my answer. I currently have two options in the active cell which I want to leave only adding data to the others. It is up to my limited experience to see if I can incorporate it and mark the thread solved. . Thanks

    Hi Jim885
    Thanks for your suggestion. under other circumstances it would be great. I think that perhaps i did not w=explain my needs carefully enough. Thanks

  5. #5
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    317

    Re: if function. Value if true. Do nothing. How?

    Hi Sktneer

    I have been fiddling with your code. It works fine but not quite as I wanted. I am looking at column “P” to see if the contents are “Petty cash”. If they are then I want to leave the original content in Column "B" if they are not then I want to enter Petty cash. The logic being that I am creating another account called Petty cash. Originally the contents of “B” came from another sheet.

    I am enclosing the sheet cut from the larger workbook. I have entered a list of possible payees under company and just pasted in their categories. You will see that already in B are the Business and personal.

    Sheet 1 is What I have
    Sheet is what I want to achieve

    Mark
    Attached Files Attached Files

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: if function. Value if true. Do nothing. How?

    I'm a little confused. On the sheet "WhatIWant" it seems like you've just added petty cash to a bunch of empty cells at the end.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  7. #7
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    317

    Re: if function. Value if true. Do nothing. How?

    Yes I have – it is mimicking how they might be entered as they arrive. In fact they have come from my control sheet. If the petty cash were to be entered it would be the date and the company name. with all the other stuff being automatic. I intend to create a “Dynamic data validation” for the categories. Hope that’s the correct name.

  8. #8
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    317

    Re: if function. Value if true. Do nothing. How?

    OH Hi Solus had not realized it was you.
    Mark

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: if function. Value if true. Do nothing. How?

    I am little confused about what do you want exactly.

    Do you mean, if there is petty cash in col. P in any row, you don't want to change the value of col. B in that row and if there is not petty cash in col. P, you want to put petty cash in col. B in that row?

    Please explain that how your two sheets differ from each other i.e. what changes do you have in "What I want to achieve" sheet and why?

  10. #10
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    317

    Re: if function. Value if true. Do nothing. How?

    Hi Guys

    I am terribly sorry that I have clearly not explained what I am doing. I so much appreciate the help I am being given.
    I am building an accounting system as an exercise _ Yes I could but it for a few quid.
    I have now uploaded where I am. Have removed a couple of screens to reduce size.
    All the data has been altered so that none of the data here is real data.
    Raw data is downloaded into the OriginalBSCombined.
    ControlSheet contains all the tables.
    A Macro converts takes the data from the OriginalBSCombined to BDC2 and converts it into my format. MainMacroOne Within this are the individual macros used.
    From BDC2 sheet a VAT sheet is created.
    From BDC2 sheet a Petty cash sheet is created. This is the sheet I am on now. I want to create a petty cash account where the income is as categorized in BCD2 and the Expenses are in the Petty cash sheet.
    In all the sheets I am using the same format.
    So now in the petty cash sheet I have all the income but the expenses are not part of the bank accounts but a separate petty cash account. So I want to ensure that all expenses in that sheet are Petty cash and I want that in the same column as the bank name. The petty cash entries will be typed in – Date; Company Name in most cases as the company will be in the CompanyToCategory table. I am working on a Dynamic Validation system to allow for new names which as entered will automatically add themselves to the CategortToComapny table.

    Again I hope this makes sense I am sometimes criticized for putting in too much information. I am sure that a lot of the code is as clunky as hell but at a later stage as my experience improves I can shorten it. This would not have been possible for me without the assistance from this site.

    Mark
    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] in this TRUE OR FALSE function, i want desired name instead of display true or false
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2013, 06:44 PM
  2. [SOLVED] In an IF function, How to ignore “[Value_if_false]” function when value is true
    By jason444 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-11-2013, 12:14 AM
  3. Help in using TRUE Function
    By medlock_1989 in forum Excel General
    Replies: 3
    Last Post: 07-02-2013, 08:13 AM
  4. IF function help - If something is true, then...
    By schueyisking in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-26-2008, 06:07 AM
  5. Function to return True/False if all are validated as True by ISNU
    By Tetsuya Oguma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2006, 06:30 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