+ Reply to Thread
Results 1 to 3 of 3

"#value" appears after pasting value of formula between spreadsheet

Hybrid View

  1. #1
    Registered User
    Join Date
    07-27-2015
    Location
    Manchester, England
    MS-Off Ver
    2013
    Posts
    3

    "#value" appears after pasting value of formula between spreadsheet

    Hi there!
    First time I humbly ask a question in this forum, and I thank you in advance for your help & attention.

    I am copying data from a spreadsheet and pasting it into another spreadsheet.
    The data I am copying/pasting is actually the value of formulas.

    Sounds pretty simple: in the original spreadsheet I select the cell I need, hit ctrl+c, switch to the other spreadsheet, hit ctrl+v, hit ctrl again, and hit "v" to mean "value"

    However, this gives me an odd problem with a specific formula.
    I copy the cell, and everything is all right, switch to the other spreadsheet (still everything ok), but when I paste the content (note: in the second spreadsheet) there is a disaster in the original spreadsheet: the formula suddenly stops working, gives the dreaded "#value" error, and excel tells me that "a value used in the formula is of the wrong data type". This has a domino effect in all following sheets of the original spreadsheet. Apocalypse.

    Actually the same effect happens when I paste anything (from any source) in the OTHER WORKBOOK. Or even type in it... I am in tears. If I paste or type in the original workbook, everything seems fine.

    Here follow some details which I think will be the key of the thing...

    The cell that creates problems contains a formula that tells excel to look into the same cell of the previous sheet, add one to its content, and show the sum.
    =1+(prevsheet(D23))

    Prevsheet() is a custom-made function, that I have created with VBA (or rather copied from a guy on the internet, let's try to be honest).
    This is the VBA code of the prevsheet() function.

    Function PrevSheet(rCell As Range)
        Application.Volatile
        Dim i As Integer
        i = rCell.Cells(1).Parent.Index
        PrevSheet = Sheets(i - 1).Range(rCell.Address)
    End Function

    Thanks in advance for you help.


    Ricaz

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,426

    Re: "#value" appears after pasting value of formula between spreadsheet

    Hit ctrl+c, switch to the other spreadsheet, select the destination cell, right-click, and choose the "123" clipboard icon, which pastes values.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    07-27-2015
    Location
    Manchester, England
    MS-Off Ver
    2013
    Posts
    3

    Re: "#value" appears after pasting value of formula between spreadsheet

    Hi Bernie, thanks for the reply.
    your suggestion is certainly correct, in a normal scenario, and I had a "more-keyboard-friendly" alternative already in my original post ("I select the cell I need, hit ctrl+c, switch to the other spreadsheet, hit ctrl+v, hit ctrl again, and hit "v" to mean "value").
    The real problem comes afterwards, when the formula with the custom function stops working.

    Further tests suggest that: if the spreadsheet with the formula with the custom function is open, the formula/function stops working (showing #value) if I type or paste anything in ANOTHER spreadsheet. Probably it is a global thing with VBA.

+ 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] Pasting values between ranges in different workbooks: "Range" works but "Cells" doesn't
    By Flaubert in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2013, 01:19 PM
  2. [SOLVED] A drop down box that is different between the "text" chosen and the "value" appears
    By dikopaw in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-13-2012, 03:16 AM
  3. Replies: 5
    Last Post: 07-05-2012, 04:04 PM
  4. Replies: 8
    Last Post: 07-05-2012, 03:07 PM
  5. Replies: 3
    Last Post: 09-29-2009, 06:42 PM
  6. Advisory "window" that appears when opening a spreadsheet
    By headbanger51 in forum Excel General
    Replies: 3
    Last Post: 01-13-2008, 02:17 PM
  7. [SOLVED] "1235" appears as "One thousand two hundred thirty five"
    By H. Kan in forum Excel General
    Replies: 9
    Last Post: 06-02-2006, 02:55 PM
  8. [SOLVED] Display a "0" when #N/A appears in formula
    By DarnTootn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-04-2006, 06:20 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