Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to select data from a range of data using an If STATEMENTS, is
this possible please see below: I am trying to return 10 columns of data if a uique number is found in a spreasheet for example 005 006 007 008 if sheets1.cells(r,1) = "007" then sheets2.cells(r,1) = sheets1.cells(r,1) sheets2.cells(r,2) = sheets1.cells(r,2) sheets2.cells(r,3) = sheets1.cells(r,3) End if |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
possibly try this modification:
if sheets1.cells(r,1).Text = "007" then sheets2.Cells(r,1).Resize(1,10).Value = _ sheets1.Cells(r,1).Resize(1,10).Value end if Note that the Sheets2 and Sheets1 is usually Sheet2 and Sheet1 unless you changed them in the VBE. -- Regards, Tom Ogilvy "Mr M Walker" wrote in message ... I am trying to select data from a range of data using an If STATEMENTS, is this possible please see below: I am trying to return 10 columns of data if a uique number is found in a spreasheet for example 005 006 007 008 if sheets1.cells(r,1) = "007" then sheets2.cells(r,1) = sheets1.cells(r,1) sheets2.cells(r,2) = sheets1.cells(r,2) sheets2.cells(r,3) = sheets1.cells(r,3) End if |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Narrow Range based on Selection in Another Range | Excel Discussion (Misc queries) | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions | |||
re-selection of Chart data range using keyboard | Excel Worksheet Functions | |||
Selection in data range | Excel Programming | |||
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. | Excel Programming |