Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find and print in new sheet
I want to make an function that looks for an number in one worksheet and copy
it in a new worksheet. like IF(A1=2;"testing";"0") but i dont want it to write 0 or leave the line empty and jump down, For exampel if a1= 1 then write b1 and d1 If a2=2 dont write anything but find next 1 and write that on next row in new worksheet. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find and print in new sheet
Sub ABCD()
Dim k as Long, cell as Range, rng as Range k = 1 set rng = Worksheets("Sheet2").Range("A1") with worksheets("sheet1") for each cell in .Range("A1:A20") if cell.Value = 1 then rng(k,1) = cell.offset(0,1) rng(k,2) = cell.offset(0,3) k = k + 1 end if Next End with End Sub -- Regards, Tom Ogilvy "SajberSmurf" wrote in message ... I want to make an function that looks for an number in one worksheet and copy it in a new worksheet. like IF(A1=2;"testing";"0") but i dont want it to write 0 or leave the line empty and jump down, For exampel if a1= 1 then write b1 and d1 If a2=2 dont write anything but find next 1 and write that on next row in new worksheet. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Active cell counting in particular print page (one sheet having different print area) | Excel Worksheet Functions | |||
Why do I get a print error light trying to print an excel sheet ? | Excel Discussion (Misc queries) | |||
How do I copy a print format from sheet to sheet in excel ? | Excel Discussion (Misc queries) | |||
I want to print out the sheet tabs (sheet names) | Excel Worksheet Functions | |||
after each print, copy data from sheet 1 to sheet 2 | Excel Programming |