Results 1 to 9 of 9

Need to PUT a VALUE into another Cell

This is a discussion on Need to PUT a VALUE into another Cell within the Excel Questions forums, part of the Question Forums category; I need to have an IF statement put it's returned VALUE into a different cell. If stmt in A1 VALUE ...

  1. #1
    New Member
    Join Date
    Aug 2002
    Location
    Jim Gramm
    Posts
    4

    Default

    I need to have an IF statement put it's returned VALUE into a different cell.
    If stmt in A1 VALUE in B5
    I need to do this without put any formula or function in B5.

  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    65,354

    Default

    On 2002-08-20 17:35, grammjr wrote:
    I need to have an IF statement put it's returned VALUE into a different cell.
    If stmt in A1 VALUE in B5
    I need to do this without put any formula or function in B5.
    Formulas don't do such things (don't have side effects), instead they calculate a value for the cells they are in.


  3. #3
    New Member
    Join Date
    Aug 2002
    Location
    Jim Gramm
    Posts
    4

    Default

    So there is no PUT fuction or some version of that to add to a formula to make it's value appear somewhere else.
    I know that is basicly what was said, I just want to be positive I can not do this.
    Seems like something that should be easy to do. Doesn't it have any value?

  4. #4
    MrExcel MVP
    Join Date
    May 2002
    Posts
    13,993

    Default

    you'll need to use VBA - what exactly are you trying to do?

    Paddy

  5. #5
    MrExcel MVP tusharm's Avatar
    Join Date
    May 2002
    Posts
    10,924

    Default

    I don't know of any spreadsheet program from VisiCalc to XL that has a 'put this value there' capability.

    In designing a worksheet, think of each cell as containing a value that is a result of what is 'over there.'

  6. #6
    MrExcel MVP
    Join Date
    May 2002
    Posts
    13,993

    Default

    On 2002-08-20 17:35, grammjr wrote:
    I need to have an IF statement put it's returned VALUE into a different cell.
    If stmt in A1 VALUE in B5
    I need to do this without put any formula or function in B5.

    This:

    Sub Update()
    NewVal = Range("a1").Value
    Range("b5").Value = NewVal
    End Sub


    will put the value of a1 in b5 - what are you trying to do?




  7. #7
    New Member
    Join Date
    Aug 2002
    Location
    Jim Gramm
    Posts
    4

    Default

    I am importing data from a workbook that I am giving to others to fill in.
    I want to move the data from these various workbooks to one centeral workbook. I have some locked col in the distributed wb and my IF statement in the centeral wb will compare the locked col and if they don't match I want no action take in the centeral wb and the want the old values to remain unchanged.

  8. #8
    MrExcel MVP
    Join Date
    May 2002
    Posts
    13,993

    Default

    Jim,


    Sub Update()
    a = Range("a2").Value
    b = Range("a3").Value
    NewVal = Range("a1").Value

    If a <> b Then
    Range("b1").Value = NewVal
    End If
    End Sub


    will compare the values in a2 & a3, & only put the value of a1 in b1 if a2 not equal to a3.

    Does that help? if not, will need a lot more details about your problem - what the sheets are called, what ranges you're comparing, etc...

    You might also look at consolidation in the help file - might be useful.



  9. #9
    New Member
    Join Date
    Aug 2002
    Location
    Jim Gramm
    Posts
    4

    Default

    Thanks to all for your help.. information will help me work around this issue.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com