+ Reply to Thread
Results 1 to 20 of 20

add data to column A using vba

  1. #1
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    add data to column A using vba

    I want to write data (date format 1-end date monthnow yearnow) in every row in column A as below.

    Column A , From read data config from another file excel column C52.

    col_header_Period = Ws.Range("C52") -----> value 1

    Capture.JPG

    Please guide me about it.
    Last edited by adamasmay; 12-28-2021 at 04:45 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: add data to column A using vba

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

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

    Re: add data to column A using vba

    Perhaps
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: add data to column A using vba

    I use follow your suggest but I don't want fix a2 , but I want instead ColumnPeriod to column A. (convert ColumnPeriod from 1 to A)
    But in ColumnPeriod now = 0
    but in value col_header_PeriodCampaign = 1

    ColumnPeriod = Split((Columns(col_header_PeriodCampaign).Address(, 0)), ":")(0)
    Range(ColumnPeriod & "2", Range("d" & Rows.Count).End(xlUp)(, -1)) = [1&upper(text(eomonth(today(),0),"-dd mmm yy"))]

    Please guide me for solve.

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

    Re: add data to column A using vba

    Just upload a workbook clearly showing before/after.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  6. #6
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: add data to column A using vba

    Please kindly file excel as attachment file.

    (I remove some sensitive data)
    Attached Files Attached Files

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

    Re: add data to column A using vba

    Confusing.
    Your workbook doesn't explain what you said in post#4.

    If the before = output and after = input then
    Please Login or Register  to view this content.
    Last edited by jindon; 12-28-2021 at 05:51 AM.

  8. #8
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: add data to column A using vba

    After run follow your suggest.
    Output as below.

    Attachment 761138

    I want same year (year now) in all rows.

    Please guide me about it.

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

    Re: add data to column A using vba

    I said just upload a workbook CLEARLY SHOWING BEFORE/AFTER to avoid any misunderstandings.

    Your attachment in #8 is invalid and picture will not help at all.

  10. #10
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: add data to column A using vba

    Sorry , I send wrong file.

    New File as attached.

    Thank you
    Attached Files Attached Files

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

    Re: add data to column A using vba

    Then
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: add data to column A using vba

    It show error as below.
    Last edited by adamasmay; 12-28-2021 at 07:57 AM.

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

    Re: add data to column A using vba

    Attach a workbook that you are actually working with the code that you are using.

    NO PICTURE.

  14. #14
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: add data to column A using vba

    picture error as below.

    Capture.JPG

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

    Re: add data to column A using vba

    If you are keep uploading picture, no more help, so wait for someone else.

  16. #16
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: add data to column A using vba

    ok , I will send file to you soon.

  17. #17
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: add data to column A using vba

    My file as attached.

    File data = file input that I want write date in column A (1-31 Dec 2021)
    File config = file config & code VBA

    Please guide me about it.

    Thank you.
    Attached Files Attached Files
    Last edited by adamasmay; 12-28-2021 at 07:59 AM.

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

    Re: add data to column A using vba

    What a waste of time...

    Did you write all those function/sub for yourself?

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

    Re: add data to column A using vba

    I don't want to get involved all this crap without providing necessary information anymore.

    This my last post here.

    Please Login or Register  to view this content.

  20. #20
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: add data to column A using vba

    If I change month to previous month

    "01" & "-" & "end date of previous month"+ "yyyyy"

    Please guide me for edit it.
    Last edited by adamasmay; 03-06-2022 at 06:58 AM.

+ 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] Rank by Column Q data first, then by Column L data, then by Column K data to break ties
    By clark402 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-08-2021, 01:27 AM
  2. [SOLVED] Extract Data in Column B and Column C Into Column E and F Based on Condition in Column D
    By bjnockle in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2021, 12:18 PM
  3. Replies: 4
    Last Post: 05-22-2020, 04:01 AM
  4. Replies: 4
    Last Post: 12-09-2019, 07:30 PM
  5. [SOLVED] Column A Data compared to Column B and Corresponding Data in Column A shown in Column C???
    By EverCheck in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-24-2015, 11:45 AM
  6. Macro to copy and paste special values for column data and filter column data
    By ascottbag in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-10-2012, 02:15 PM
  7. Replies: 3
    Last Post: 02-08-2010, 06:18 PM

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