+ Reply to Thread
Results 1 to 5 of 5

Write data from one column to the one next by.

  1. #1
    Registered User
    Join Date
    12-05-2023
    Location
    Steinfurt, Germany
    MS-Off Ver
    2016
    Posts
    2

    Write data from one column to the one next by.

    Hello folks,

    greetings from Germany.

    I've got an if-statement that match the background color of a cell. Works fine, but it's not made by me. So, I'm far away to understand the details.

    What I want to achieve is that if a cell is blue, the neighboring cell has a 1. Because the script only asks for a certain blue color, the 1 in the neighboring cell should represent a visual check.

    I'm pretty shure it's an easy task for the professionals.

    The trouble in the script starts at line 51.
    Please Login or Register  to view this content.
    bgColors[i][k] looks to me as a cell coordinate. I mean, is one. But to manipulate this, I failed.

    Link:
    docs.google.com/spreadsheets/d/1j4sOusYeuqHgMWqTNbwf1Y-4YIIBPT1dm2KyY8HAImw/edit?usp=sharing

    I have to apologize for my buggy English. Please take a look to the sheet, it's very easy to understand.

    cheers,

    sinnie

  2. #2
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Write data from one column to the one next by.

    Try changing your script from this:

    Please Login or Register  to view this content.
    to this:

    Please Login or Register  to view this content.
    As a gesture off appreciation, you can click * Add Reputation at the foot of any of the posts of members who helped you reach a solution.

    And finally, was your problem solved? if so, please click Thread Tools above the first post of your enquiry, then select [Solved]

  3. #3
    Registered User
    Join Date
    12-05-2023
    Location
    Steinfurt, Germany
    MS-Off Ver
    2016
    Posts
    2

    Re: Write data from one column to the one next by.

    Hi janmorris,

    sorry, to eliminate the two slashes in line 51 shows only an error.

    I've just made the code to editing, sorry for don't do it in first place.

  4. #4
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Write data from one column to the one next by.

    Please check the script snippet again.

    There are 2 changes:
    remove the // from line 51
    add a closing } to line 69

  5. #5
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Write data from one column to the one next by.

    After discussion in the file, your new requirement is to sum D when C is highlighted.

    Here is apps script modified for the new conditions:

    Please Login or Register  to view this content.
    Last edited by janmorris; 12-09-2023 at 08:10 PM.

+ 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] Check value from another column and write data
    By adamasmay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2022, 05:02 AM
  2. Replies: 4
    Last Post: 09-14-2017, 09:16 PM
  3. Need help with below Macro to write data end of column list
    By ikhan99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2016, 12:20 PM
  4. [SOLVED] Read data from column write to seperate column.
    By echophi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2014, 01:42 PM
  5. [SOLVED] how to write data just in column B
    By awankthereds in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-25-2012, 08:27 AM
  6. Sort & re-write column data to rows - Excel 2003
    By latenite76 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-11-2008, 06:41 PM
  7. [SOLVED] write formula that grabs data from last column
    By marlowisws in forum Excel General
    Replies: 0
    Last Post: 08-04-2006, 12:45 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