+ Reply to Thread
Results 1 to 5 of 5

Thread: New value in a cell

  1. #1
    alvin Kuiper
    Guest

    New value in a cell

    Hi
    I'm using this to write a new value in a empty cell
    With Worksheets("Ark1")
    Set cell = .Cells(Rows.Count, 1).End(xlUp)
    End With
    If Not IsEmpty(cell) Then Set cell = cell(2)
    cell.Value = antal

    this code insert a new postin collum A

    Now my problem is that i have 2 values i want to ahve in collum
    A and B How do i do that?

    regards

    Alvin




  2. #2
    Gary Keramidas
    Guest

    Re: New value in a cell

    if i understand, you wnt something in the cell next to it?

    cell.offset(0,1).value = "your 2nd value"

    --


    Gary


    "alvin Kuiper" <alvinKuiper@discussions.microsoft.com> wrote in message
    news:23944627-115B-4692-909F-7324998D80BF@microsoft.com...
    > Hi
    > I'm using this to write a new value in a empty cell
    > With Worksheets("Ark1")
    > Set cell = .Cells(Rows.Count, 1).End(xlUp)
    > End With
    > If Not IsEmpty(cell) Then Set cell = cell(2)
    > cell.Value = antal
    >
    > this code insert a new postin collum A
    >
    > Now my problem is that i have 2 values i want to ahve in collum
    > A and B How do i do that?
    >
    > regards
    >
    > Alvin
    >
    >
    >




  3. #3
    sebastienm
    Guest

    RE: New value in a cell

    Hi

    - first , you may want to put a dot '.' in front of the property Rows.Count.
    - now to get the cell to the right of the variable cell, you can use :
    cell.Offset(0,1)

    With Worksheets("Ark1")
    Set cell = .Cells(.Rows.Count, 1).End(xlUp)
    End With
    If Not IsEmpty(cell) Then Set cell = cell(2)
    cell.Value = antal
    cell.Offset(0,1).Value = ...
    --
    Regards,
    Sébastien
    <http://www.ondemandanalysis.com>


    "alvin Kuiper" wrote:

    > Hi
    > I'm using this to write a new value in a empty cell
    > With Worksheets("Ark1")
    > Set cell = .Cells(Rows.Count, 1).End(xlUp)
    > End With
    > If Not IsEmpty(cell) Then Set cell = cell(2)
    > cell.Value = antal
    >
    > this code insert a new postin collum A
    >
    > Now my problem is that i have 2 values i want to ahve in collum
    > A and B How do i do that?
    >
    > regards
    >
    > Alvin



  4. #4
    alvin Kuiper
    Guest

    RE: New value in a cell

    thanks its working

    best regards
    ALivn


    "sebastienm" wrote:

    > Hi
    >
    > - first , you may want to put a dot '.' in front of the property Rows.Count.
    > - now to get the cell to the right of the variable cell, you can use :
    > cell.Offset(0,1)
    >
    > With Worksheets("Ark1")
    > Set cell = .Cells(.Rows.Count, 1).End(xlUp)
    > End With
    > If Not IsEmpty(cell) Then Set cell = cell(2)
    > cell.Value = antal
    > cell.Offset(0,1).Value = ...
    > --
    > Regards,
    > Sébastien
    > <http://www.ondemandanalysis.com>
    >
    >
    > "alvin Kuiper" wrote:
    >
    > > Hi
    > > I'm using this to write a new value in a empty cell
    > > With Worksheets("Ark1")
    > > Set cell = .Cells(Rows.Count, 1).End(xlUp)
    > > End With
    > > If Not IsEmpty(cell) Then Set cell = cell(2)
    > > cell.Value = antal
    > >
    > > this code insert a new postin collum A
    > >
    > > Now my problem is that i have 2 values i want to ahve in collum
    > > A and B How do i do that?
    > >
    > > regards
    > >
    > > Alvin

    >


  5. #5
    alvin Kuiper
    Guest

    Re: New value in a cell

    Yes thank you

    Alvin

    "Gary Keramidas" wrote:

    > if i understand, you wnt something in the cell next to it?
    >
    > cell.offset(0,1).value = "your 2nd value"
    >
    > --
    >
    >
    > Gary
    >
    >
    > "alvin Kuiper" <alvinKuiper@discussions.microsoft.com> wrote in message
    > news:23944627-115B-4692-909F-7324998D80BF@microsoft.com...
    > > Hi
    > > I'm using this to write a new value in a empty cell
    > > With Worksheets("Ark1")
    > > Set cell = .Cells(Rows.Count, 1).End(xlUp)
    > > End With
    > > If Not IsEmpty(cell) Then Set cell = cell(2)
    > > cell.Value = antal
    > >
    > > this code insert a new postin collum A
    > >
    > > Now my problem is that i have 2 values i want to ahve in collum
    > > A and B How do i do that?
    > >
    > > regards
    > >
    > > Alvin
    > >
    > >
    > >

    >
    >
    >


+ 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.2.0