+ Reply to Thread
Results 1 to 3 of 3

Problem with if formulae

  1. #1
    Registered User
    Join Date
    09-04-2009
    Location
    Gloucestershire, England
    MS-Off Ver
    Excel 2010
    Posts
    45

    Smile Problem with if formulae

    Hi,
    I need to copy info from 'sheet1!columnJ' into 'sheet2!columnO', if the data in sheet1!columnA matches the data in sheet2!columnA.
    in cell O2 in sheet 2 I tried:
    =if((new_clients_company_name=C3),new_clients_postcode," ")

    please note that new_clients_company_name is sheet1 column A.
    new_clients postcode is sheet1 column J.

    my formulae did not work at all and just sat in the cell doing nothing. What am I doing wrong?
    Grateful for any help
    many thanks
    carrach

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Problem with if formulae

    No really a programming question but anyway...

    Do you mean you have a table on Sheet 1 that you want to look up the value from Sheet 2 column A and return the respective post code?

    If I've understand correctly you would use VLOOKUP rather than an IF formula.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Problem with if formulae

    Quote Originally Posted by carrach View Post
    Hi,
    I need to copy info from 'sheet1!columnJ' into 'sheet2!columnO', if the data in sheet1!columnA matches the data in sheet2!columnA.
    in cell O2 in sheet 2 I tried:
    =if((new_clients_company_name=C3),new_clients_postcode," ")

    please note that new_clients_company_name is sheet1 column A.
    new_clients postcode is sheet1 column J.

    my formulae did not work at all and just sat in the cell doing nothing. What am I doing wrong?
    Grateful for any help
    many thanks
    carrach
    Your formula doesn't match your description. Where did C3 come into the picture?
    I think you are trying to do this. Find the row in Sheet1!Column A that has the company in C3, and then get the code from Sheet1!Column J for that row.
    O2 : =Index(new_clients_postcode,match(C3,new_clients_company_name,0),1)
    It could also be accomplished like Dom says
    O2 : =VLookup(C3,Sheet1!$A:$J,10,FALSE)
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

+ 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