+ Reply to Thread
Results 1 to 1 of 1

Replacing cell value without replacing formula in the cell

  1. #1
    Registered User
    Join Date
    10-16-2012
    Location
    Finland
    MS-Off Ver
    Excel 2007
    Posts
    15

    Replacing cell value without replacing formula in the cell

    Hello!

    Here is the situation:

    - I have raw data on Sheet 1 on Collumns B:E ( example B1 Apple C1 Car D1 50 E1 100)
    - The data from B:E is put together to Sheet 2 to collumn C (Apple|Car|50|100) Formula: IF(Sheet1!B5="";"";Sheet1!B5&"|"&Sheet1!C5&"|"&Sheet1!D5&"|"&Sheet1!E5))
    - When there is a data on C collumn, cell next to it on B collumn turns into "Yes" Formula: =IF(C1<>"";"yes";"")
    - Then there is a macro that exports txt file consisting of Collumn C IF there is "yes" on collumn B
    - After the macro has been run (txt file created), it should turn all the "yes" values into "no" values -> won't include them anymore when the txt file is created next time

    I created a code that doesn't just quite work.The debugger says that there is a problem in [ If cell.Value <> "" Then ] , but I don't really know why. Also, once I tried another code, but it replaced everything, including all the =IF(C1<>"";"yes";"") formulas. Any idea what's wrong with the code? This is probably very simple for someone who actually knows what he's doing.


    Please Login or Register  to view this content.

    Moderator Edit:

    Welcome to the forum, kingoftheace.

    Please notice that [CODE] tags have been added to your post. The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.
    Last edited by Cutter; 10-17-2012 at 06:01 PM. Reason: Added code tags

+ 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