+ Reply to Thread
Results 1 to 2 of 2

INsert Formula iin Macros

Hybrid View

  1. #1
    Registered User
    Join Date
    12-21-2013
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    15

    INsert Formula iin Macros

    Hi All,


    I have tried to insert the formula in VBA in Z4 Cell but it gives an error. Please advise what should i do. Formula works fine in normal excel but not in macros. Thank you in advance.


    =IF(AND(U4="",Y4=""),"N/A in RMS Report",IF(Y4="","Office Location Missing in RMS",IF(IF(Y4="United States-New York-30 Rock-NYR","NY-30 Rock",IF(Y4="United States-Arlington, VA-Rosslyn-ROS","Arlington - Rosslyn",IF(Y4="United States-Arlington-1101 Wilson-ARN","Arlington - Wilson",IF(Y4="United Sstin-Briarwick-AUN","Austin-Briarwick",IF(Y4="United States-Costa Mesa-ORN","Orange Cnty-Costa",IF(Y4="United States-New York-1633 Broadway-NYB","NY-1633 Broadway",IF(Y4="United States-New York-140 Broadway-NYM","NY-140 Broadway",IF(Y4="United States-Alexandria-ALX","Alexandria - Duke",IF(Y4="United States-Jersechange Place-JCA","JerseyCty-Harbor",LEFT(SUBSTITUTE(Y4,"United States-",""),(FIND("-",SUBSTITUTE(Y4,"United States-",""))-1)))))))))))=(IF(L4="NY-30 Rock","NY-30 Rock",IF(L4="Arlington - Rosslyn","Arlington - Rosslyn",IF(L4="Arlington - Wilson","Arlington - Wilson",IF(L4="Austin-Briarwick","Austick",IF(L4="Orange Cnty-Costa","Orange Cnty-Costa",IF(L4="NY-1633 Broadway","NY-1633 Broadway",IF(L4="NY-140 Broadway","NY-140 Broadway",IF(L4="Alexandria - Duke","Alexandria - Duke",IF(L4="JerseyCty-Harbor","JerseyCty-Harbor",IFERROR(LEFT(L4,FIND("-",L4)-1),L4)))))))))))=TRUE,"","Office Mismatch")))

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: INsert Formula iin Macros

    http://www.mrexcel.com/forum/excel-q...la-macros.html

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this http://www.excelguru.ca/content.php?184 to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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. how to insert row in a document with macros without disturbing them
    By 2mi3 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2015, 12:40 AM
  2. Macros/VBA to do a loop and insert text
    By fazilps in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2014, 11:13 PM
  3. Insert rows with macros
    By gbisbing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2014, 10:39 AM
  4. [SOLVED] Insert Row & Insert Column Macros
    By amfrancis in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-19-2014, 01:07 PM
  5. Macros to insert row& copy formula on multiple sheets
    By Mysore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-19-2012, 08:12 PM
  6. macros to insert text
    By up4asmile in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2006, 06:04 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