+ Reply to Thread
Results 1 to 9 of 9

"NEXT" macro

  1. #1
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    298

    Exclamation "NEXT" macro

    Hi Guys,


    The goal is very simple: using a reference cell located in tab 1, find this reference in tab 2, go the next cell down, and paste that value to the reference cell in tab 1.


    I have attached an example spreadsheet and I believe the steps would be:

    1) Tab 1, reference is located in cell B7 (for example 70100098230)
    2) Go to Tab 2, and find where this reference is located (for the example above, the reference is located in A3)
    3) Move one cell down (for the example above, A4)
    4) Copy the value (for the example above, the value in A4 is 70100098232)
    5) Go back to Tab 1 and past it (value only) in B7


    If someone could help would appreciate very much.

    Thanks,

    Rick
    Attached Files Attached Files
    Last edited by ricdamiani; 07-16-2016 at 01:13 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,447

    Re: "NEXT" macro

    Hi ricdamiani,

    Try this macro for Next:

    Please Login or Register  to view this content.
    Part of your problem is that on Tab 1 that cell is a number and on Tab 2 it is text (or vice versa).
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    298

    Re: "NEXT" macro

    Quote Originally Posted by MarvinP View Post
    Part of your problem is that on Tab 1 that cell is a number and on Tab 2 it is text (or vice versa).
    Hi MarvinP, thanks for your help.

    And what would be the solution for this problem? Making all as numbers?

    The macro is working well, thanks for that. But can you please also provide another macro, but this time instead of going to the next item (cell down) goes to the previous item (cell up)?

    Appreciate your help again.

    Regards,

    Rick

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: "NEXT" macro

    Try this
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    298

    Re: "NEXT" macro

    It's working well. Thanks jindon and MarvinP.

    Kind regards,

    Rick

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,447

    Re: "NEXT" macro

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    298

    Re: "NEXT" macro

    Hi jingdon and MarvinP

    I have been using this macro on daily basis for over a year now, but I need to make some changes.
    Original request was below, and the requested changes are in bold:

    1) Tab 1, reference is located in cell B7 (for example 70100098230).The reference now is a combination of two values, cell B7 and cell A7 (for example 70100098230 in B7 and 1371 in A7).
    2) Go to Tab 2, and find where this reference is located (for the example above, the reference is located in A3).B7 reference is located somewhere in column A, and reference in A7 is located in column B.
    3) Move one cell down (for the example above, A4)
    4) Copy the value (for the example above, the value in A4 is 70100098232)
    5) Go back to Tab 1 and past it (value only) in B7

    Could you please help me with that?

    Cheers

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: "NEXT" macro

    You mean like this?
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    07-28-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    298

    Re: "NEXT" macro

    Yes, it works. As always, thanks jindon

+ 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] Excel 2010 -- "Visual Basic" "Macros" and "Record Macro" all disabled.
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2017, 06:11 AM
  2. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. [SOLVED] Need Macro to compile data from "Weekly" sheets and sum up into "Monthly" summary sheet
    By mo4391 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2013, 07:25 PM
  5. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM
  6. Macro Error with code "Range("A65536").End(xlUp).EntireRow.Insert"
    By lukasj13 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2010, 08:48 PM
  7. Replies: 0
    Last Post: 07-17-2006, 09:45 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