+ Reply to Thread
Results 1 to 7 of 7

If cell contains text or number copy different cells

  1. #1
    Registered User
    Join Date
    12-21-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    2007
    Posts
    4

    If cell contains text or number copy different cells

    Hi

    I am trying to work out the formula I would need for the same cell to copy the value from another cell if the text "PTI" is input but if a value is put in the same cell instead of "PTI" to then multiply that value by the labour rate I have put in a different cell

    This is what I have put, its working for calculating the hours but when I put PTI in the cell it comes up with a value error
    =IF(A7>=0,A7*B5)*OR(A7="PTI",B4)


    Cost Allocations.xls

  2. #2
    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,929

    Re: If cell contains text or number copy different cells

    Hi, welcome to the forum

    you were almost there...
    =IF(A7="PTI",B4,A7*B5)
    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

  3. #3
    Registered User
    Join Date
    12-21-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    2007
    Posts
    4

    Re: If cell contains text or number copy different cells

    Awesome ! Thanks

    But now if I drag the formula down it moves the cell down (so b4 turns to B5)

    How do I make that stay B4 so that when ever PTI is selected it always copies the value from B4?

    =IF(A7="PTI",B4,A7*B5)

  4. #4
    Registered User
    Join Date
    12-21-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    2007
    Posts
    4

    Re: If cell contains text or number copy different cells

    all good sorted that last bit

    How would I make the cell blank if the total was zero (not yet filled in)

  5. #5
    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,929

    Re: If cell contains text or number copy different cells

    Maybe this?
    =IF(A7="","",IF(A7="PTI",$B$4,A7*B5))

  6. #6
    Registered User
    Join Date
    12-21-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    2007
    Posts
    4

    Re: If cell contains text or number copy different cells

    Champion !!

    Thanks heaps !!

  7. #7
    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,929

    Re: If cell contains text or number copy different cells

    Happy to help

+ 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. copy number to different worksheet based on text in previous cells.
    By naccas1990 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-11-2015, 12:58 AM
  2. Replies: 5
    Last Post: 02-02-2015, 07:07 PM
  3. Check if a cell contains text copy number to new column
    By lto120636 in forum Excel General
    Replies: 5
    Last Post: 07-14-2014, 08:39 AM
  4. [SOLVED] VBA Needed to find number/text within cell string and copy out to new cell
    By Campbell A in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-19-2013, 10:15 AM
  5. [SOLVED] If text the delete, if number then copy number to another cell
    By exchangejames in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-22-2013, 10:01 AM
  6. copy cell value (here text) to a predetermined number of cells,
    By Amsterdam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-16-2012, 03:59 PM
  7. how to count the number of text frequencies and copy to other cell
    By DG in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-06-2005, 03: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