Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying values between sheets


I have an excel file with several sheets. I want to copy values on
sheet 1 using a macro command because I have several values to copy
each day. One value of interest is located on sheet 1 at range b11.

On sheet 2 I have 2 columns, one column called -ind1- returns a '1'
when todays date is entered. The other column called -TSCRAL- is where
I want the value from Sheet 1 pasted (at the intersect of the returned
value 1 of 'ind1' column depending on the date)


--
bbuzz
------------------------------------------------------------------------
bbuzz's Profile: http://www.excelforum.com/member.php...o&userid=28466
View this thread: http://www.excelforum.com/showthread...hreadid=480810

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copying values between sheets

Dim rng as Range, rng1 as range
Dim res as Variant
Dim rng2 as Range
with worksheets("Sheet2")
set rng = .rows(1).Find("-ind1-")
set rng1 = .rows(1).Find("-TSCRAL-")
if not rng is nothing and not rng1 is nothing then
res = Application.Match(1,rng.EntireColumn,0)
if not iserror(res) then
set rng2 = rng1(res)
else
msgbox "Today's date not entered"
exit sub
end if
else
msgbox "column not found"
exit sub
end if
End With
worksheets("Sheet1").copy Destination:=rng2

--
Regards,
Tom Ogilvy

"bbuzz" wrote in
message ...

I have an excel file with several sheets. I want to copy values on
sheet 1 using a macro command because I have several values to copy
each day. One value of interest is located on sheet 1 at range b11.

On sheet 2 I have 2 columns, one column called -ind1- returns a '1'
when todays date is entered. The other column called -TSCRAL- is where
I want the value from Sheet 1 pasted (at the intersect of the returned
value 1 of 'ind1' column depending on the date)


--
bbuzz
------------------------------------------------------------------------
bbuzz's Profile:

http://www.excelforum.com/member.php...o&userid=28466
View this thread: http://www.excelforum.com/showthread...hreadid=480810



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying values between sheets


'
Dim isect As Range
Dim res As Range
Sheets("Ajust. Rapport Jour").Select
Range("B11").Select
Selection.Copy
Sheets("Base de Données").Select
res = Application.Match(1, Range("IND1"), 0)
Set isect = Application.Intersect(Range("res"), Range("TSCRAL"))
isect.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False 'Removes the marquee.
End Sub



Tried a mixture from a few forums to come up with this, but still no
luck.


--
bbuzz
------------------------------------------------------------------------
bbuzz's Profile: http://www.excelforum.com/member.php...o&userid=28466
View this thread: http://www.excelforum.com/showthread...hreadid=480810

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying values between sheets


'
Dim isect As Range
Dim res As Range
Sheets("Ajust. Rapport Jour").Select
Range("B11").Select
Selection.Copy
Sheets("Base de Données").Select
res = Application.Match(1, Range("IND1"), 0)
Set isect = Application.Intersect(Range("res"), Range("TSCRAL"))
isect.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False 'Removes the marquee.
End Sub



Tried a mixture from a few forums to come up with this, but still n
luck

--
bbuz
-----------------------------------------------------------------------
bbuzz's Profile: http://www.excelforum.com/member.php...fo&userid=2846
View this thread: http://www.excelforum.com/showthread.php?threadid=48081

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
Copying as absolute values across multiple sheets TeeJay Excel Discussion (Misc queries) 3 October 18th 07 09:45 AM
hiding zero values on all sheets & by default on new sheets WiFiMike2006 Excel Worksheet Functions 4 January 19th 07 08:13 PM
copying sheets fastballfreddy Excel Discussion (Misc queries) 2 May 5th 06 07:20 AM
Copying Sheets ianripping[_21_] Excel Programming 2 January 16th 04 12:28 PM
Copying sheets John Excel Programming 1 October 24th 03 07:37 PM


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

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

About Us

"It's about Microsoft Excel"