+ Reply to Thread
Results 1 to 4 of 4

Copy value and associated offset into 2 other columns

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    Planet Earth
    MS-Off Ver
    2016
    Posts
    96

    Copy value and associated offset into 2 other columns

    Hi

    I have a column B where some values (probably thousands) that should be in the date format are missing the day and month, hence have just the year as a 4 digit number. (Please see attached Example.xlsx) (it includes expected results)

    I'd like to use VBA to copy just the cells that have the year (4 digit number format like ####) as well as their offsets from column A, on columns F and E respectively.

    I require VBA for this problem as there are thousands of values that meet this condition, so a for loop would be required.

    Please Login or Register  to view this content.
    Thank you very much!
    Gordon
    Attached Files Attached Files
    Last edited by Gordon85; 08-06-2020 at 03:04 PM.

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Copy value and associated offset into 2 other columns

    Hi Gordon,

    Try the below code based on your sample file

    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  3. #3
    Registered User
    Join Date
    01-30-2020
    Location
    Planet Earth
    MS-Off Ver
    2016
    Posts
    96

    Re: Copy value and associated offset into 2 other columns

    Thank you! It works!
    Rep+
    Solved.

  4. #4
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Copy value and associated offset into 2 other columns

    Glad to help & thanks for the reps ... Without a macro, you can just filter column B with <3000 copy data paste on E1 un-filter

+ 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 Offset for Every x Columns
    By el-paso in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2020, 07:09 PM
  2. Replies: 1
    Last Post: 12-20-2019, 01:49 AM
  3. Offset after the 2 columns.
    By jc83ph in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-12-2019, 03:12 PM
  4. Match 2 Columns in two sheets; copy an offset Column of matched Row to Sheet 1
    By sureng20 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-01-2017, 03:08 AM
  5. [SOLVED] copy value of a cell and cut/copy offset by 1 column and 1 row
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2015, 12:57 PM
  6. Copy from Array in ActiveWorkbook to ThisWorkbook; Transpose copy, Offset Paste
    By sbradley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 05:17 PM
  7. Replies: 4
    Last Post: 03-08-2013, 09:49 AM

Tags for this Thread

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