Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ' 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ' 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying as absolute values across multiple sheets | Excel Discussion (Misc queries) | |||
hiding zero values on all sheets & by default on new sheets | Excel Worksheet Functions | |||
copying sheets | Excel Discussion (Misc queries) | |||
Copying Sheets | Excel Programming | |||
Copying sheets | Excel Programming |