+ Reply to Thread
Results 1 to 9 of 9

Question on a macro or function statement

  1. #1
    Registered User
    Join Date
    10-09-2014
    Location
    Houston, Texas
    MS-Off Ver
    2013
    Posts
    4

    Question on a macro or function statement

    Hi Everyone,

    I'm currently trying to make a macro or an if function that see if Column A has Ru-barb and if it does to put Pie into Column C. Also if Column A has Baked to put into Column C Brownies. Does anyone know of a macro that can accomplish this task or something similar? Thank you for your time in advance.

    From:
    Ru-barb
    Baked

    To:
    Ru-barb Pie
    Baked Brownies

  2. #2
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Canada Eh
    MS-Off Ver
    Excel 2010
    Posts
    199

    Re: Question on a macro or function statement

    Something like
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Should work.
    Click the * to give Rep to a post you like.

  3. #3
    Registered User
    Join Date
    10-09-2014
    Location
    Houston, Texas
    MS-Off Ver
    2013
    Posts
    4

    Re: Question on a macro or function statement

    Is there anyway to make it column specific instead of one cell? Lets say I have a random list of these items in a jumbled order.

  4. #4
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Canada Eh
    MS-Off Ver
    Excel 2010
    Posts
    199

    Re: Question on a macro or function statement

    Take that formula and copy down. I placed that formula in C1 and copied it down to C10 and it checked all those in A from A1 to A10. Is that what you mean?

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Question on a macro or function statement

    FWIW:

    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Question on a macro or function statement

    the IF() function is adequate when you have a few choices to make. This sort of thing seems to me like it can expand pretty quickly. If I am correct in that, you may want to consider building a lookup table and using one of Excel's lookup() functions (VLOOKUP() for example https://support.office.com/en-us/art...rs=en-US&ad=US ) rather than a long string of nested IF() functions.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Registered User
    Join Date
    10-09-2014
    Location
    Houston, Texas
    MS-Off Ver
    2013
    Posts
    4

    Re: Question on a macro or function statement

    Thank you John. I apologize ahead of time for not explaining the task further, I need it to also search for cells that have a likeness to Ru-barb, such as Hot Ru-barb, Steamy Ru-barb, etc. to then return pie in the third column.

  8. #8
    Registered User
    Join Date
    10-09-2014
    Location
    Houston, Texas
    MS-Off Ver
    2013
    Posts
    4

    Re: Question on a macro or function statement

    Yes Mad-Mizer, that's what I want to have happen. Also for likenesses to be compared such as search for Hot Ru-barb to return pie to both of those rows that contain Ru-barb.

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Question on a macro or function statement

    Quote Originally Posted by TomExcelMon View Post
    Thank you John. I apologize ahead of time for not explaining the task further, I need it to also search for cells that have a likeness to Ru-barb, such as Hot Ru-barb, Steamy Ru-barb, etc. to then return pie in the third column.
    Try:

    Please Login or Register  to view this content.

+ 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. Hi and an IF statement question
    By Johnmitch93 in forum Excel General
    Replies: 4
    Last Post: 11-11-2011, 05:23 PM
  2. Have question about using .find statement and brackets around After:= statement
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-09-2011, 03:28 PM
  3. Challenging question about if function with macro
    By keis386 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2011, 06:44 AM
  4. If statement question
    By dlb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-17-2006, 01:14 PM
  5. IF Statement Question
    By Scott in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 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