Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default sheets.range and adding cells that are out of the range

Can I add several non sequential cells?

Currently I have

With Sheets("15min").Range("A2:S2")
.Parent.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Resize(1,
18).Value = .Value ' copies data from row 1 down to the bottom

End With

But I also want to add some data to BA and CA of this same row. How can I do
that? When I try to add the data, it creates a new row...
BA = current time
CA = total sales (from Sales worksheet Cell C,5 )



Thanks
Phil




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default sheets.range and adding cells that are out of the range

Phil,

Try:

Dim myRow As Long

With Sheets("15Min").Range("A2:S2")
myRow = .Parent.Range("A" & Rows.Count).End(xlUp)(2).Row
.Parent.Cells(myRow, 1).Resize(1, 18).Value = .Value
.Parent.Range("BA" & myRow).Value = "Whatever1"
.Parent.Range("CA" & myRow).Value = "Whatever2"
End With

HTH,
Bernie
MS Excel MVP

"Phillips" wrote in message
news:Ddgub.230946$Fm2.232118@attbi_s04...
Can I add several non sequential cells?

Currently I have

With Sheets("15min").Range("A2:S2")
.Parent.Range("A" & Rows.Count).End(xlUp).Offset(1,

0).Resize(1,
18).Value = .Value ' copies data from row 1 down to the bottom

End With

But I also want to add some data to BA and CA of this same row. How can I

do
that? When I try to add the data, it creates a new row...
BA = current time
CA = total sales (from Sales worksheet Cell C,5 )



Thanks
Phil






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
Revisit an older post, looking for SQL help on adding range data frommany sheets to a single sheet Rick[_10_] Excel Worksheet Functions 4 May 31st 09 09:02 PM
adding values if the same - SUMIF in range of cells? Eisaz Excel Worksheet Functions 4 November 18th 08 05:05 AM
Adding A range of cells that have a certain text letter Dave Excel Worksheet Functions 3 September 7th 06 06:13 PM
Sum func. is adding cells not in specified range Big Daddy Excel Worksheet Functions 1 July 14th 05 08:36 PM
Adding contents of one cell to a range of cells. CLJinVA Excel Worksheet Functions 1 February 10th 05 10:19 PM


All times are GMT +1. The time now is 10:27 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"