+ Reply to Thread
Results 1 to 2 of 2

Lock cells to prevent pre-defined range 'macro' copying.

  1. #1
    Registered User
    Join Date
    10-13-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    29

    Red face Lock cells to prevent pre-defined range 'macro' copying.

    Guys,

    I have a spreadsheet that allows users to paste set data from a PDF Image (using OCR) straight into Excel and then use the MID function to split the data accordingly.
    Unfortunately, the OCR isn’t too intuitive and gets it wrong sometimes.
    So to counter this, in another sheet (in the same workbook) I have a manual input section, and a simple macro button that pastes this data into the same fields where the OCR text would be, so that the main sheet works exactly the same way as before.

    The problem is, and most likely due to the simplicity of the sheet, if a combination of OCR pasting and manual inputting is used, when I hit the paste button, it over rides the OCR data with blank cells

    In the link below I have shown what is currently happening (1, 2, 3), and an example of what I would actually like it to do (4, 5, 6).

    http://www.editgrid.com/user/klis/Example

    So, in the 2nd scenario, I would like “5” to recognise that the respective cells in “4” already contain data and fill them ‘Grey’. This I have already achieved with basic conditional formatting.
    However, I need to take it 1 step further and say that if the parent sheets cell (Auto OCR) contains data, as well as filling cells (in sheet Manual) lock these cells off and prevent the end user from adding data and/ or being copied over to the parent sheet.

    Is this possible?

    The result then being the parent sheet with both OCR text and copied text from the manual input sheet.

    Both sheets are protected anyway and only allow for user input in certain areas, so is it even possible to apply further protection once the sheet is locked already?

    Thank you extremely muchly in advance

  2. #2
    Registered User
    Join Date
    10-13-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Lock cells to prevent pre-defined range 'macro' copying.

    Ok, someone suggested that instead of trying to lock the cells, I should, in another column, create a true/ false scenario and then if true (contains data) only copy those cells.

    Presently the ‘recorded’ macro looks like this (Very basic)

    Please Login or Register  to view this content.
    And using the grey fill formula I said I was using already to work out if the main cell contained data:

    Please Login or Register  to view this content.
    … Can I then alter the above macro to only select and copy the range and paste into the main area.

    The main area range (Auto ACR) is A5:A44
    And the area range for InMan (Manual) is G4:G43 (as above)

    Thanks again in advance and hope I have made some sense
    Last edited by klis; 10-30-2012 at 02:59 PM. Reason: wrong cell range :(

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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