Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default 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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options Yuvraj Excel Discussion (Misc queries) 0 June 29th 09 11:20 AM
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Yuvraj Excel Discussion (Misc queries) 0 June 26th 09 06:01 PM
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 [email protected] Excel Worksheet Functions 1 August 22nd 08 02:04 AM
How to create/run "cell A equals Cell B put Cell C info in Cell D abmb161 Excel Discussion (Misc queries) 5 January 26th 06 06:36 PM
data validation to restrict input in cell based on value of cell above that cell NC Excel Programming 2 January 25th 05 07:11 AM


All times are GMT +1. The time now is 06:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"