Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all, I have a quick question. I have a spreadsheet that I nee
to have remain open in the background of another spreadsheet. I nee to create a code that will take the info from a1 of the mai spreadsheet and input it in a1 of the background spreadsheet. Th tricky part that I can't figure out, is that if a1 on the backgroun already has something typed in it, then I need it to put the info i a2, so on and so forth. The background sheet is going to be updated o a minute by minute basis. IE. SheetA.xls (in the background) SheetB.xls (main screen) MacroA takes the info from SheetB Cell A1 and puts it in SheetA Cell A only if it's empty. If it has something in it already, then it need to put it in SheetA Cell A2. Any Ideas??? Thanks for all the help! -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tiptop,
First Case- Value to be entered in Cell A1 if empty, otherwise in cell A2: Set rng1 = IIf(IsEmpty(ws1.Range("A1")), ws1.Range("A1"), ws1.Range("A2")) ----------------------------------- Second Case - Value to be entered in Cell A1 if empty, otherwise in first blank cell in column A: Set NextCell =ws1.Cells(Rows.Count, "A").End(xlUp)(2) Set rng1 = IIf(IsEmpty(ws1.Range("A1")), ws1.Range("A1"), NextCell) --- Regards, Norman "tiptop " wrote in message ... Hello all, I have a quick question. I have a spreadsheet that I need to have remain open in the background of another spreadsheet. I need to create a code that will take the info from a1 of the main spreadsheet and input it in a1 of the background spreadsheet. The tricky part that I can't figure out, is that if a1 on the background already has something typed in it, then I need it to put the info in a2, so on and so forth. The background sheet is going to be updated on a minute by minute basis. IE. SheetA.xls (in the background) SheetB.xls (main screen) MacroA takes the info from SheetB Cell A1 and puts it in SheetA Cell A1 only if it's empty. If it has something in it already, then it needs to put it in SheetA Cell A2. Any Ideas??? Thanks for all the help!! --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm a little bit lost. The 2nd case is most likely what I will need t
use. But, I can't figure out how to put it in my code. Below is kin of where I am at... Sub ProcessedExceptions() ChDir "C:\Documents and Settings\Administrator\Desktop" Workbooks.Open Filename:= _ "C:\Documents and Settings\Administrator\Desktop\Processe Exceptions.xls" ActiveWindow.WindowState = xlMinimized Workbooks("Online Exceptions.xls").Activate End Sub Basically, for example. The info that is in (Online Exceptions.xls cell S13) needs to be entered in file (Processed Exceptions.xls, Cel A1, A2....). I'm trying to make life a little easier and tree friendl at work...I process these exceptions roughly 700-900 exceptions a da (each on an individual sheet of paper) so this will make my life a LO easier if I can figure out the correct code. Thanks again for all th help! -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi TipTop,
In the absence of more concrete detail, perhaps the following routine will enable you to progress your project. In its present incarnation, the routine is run once the requisite cells in the Online Exceptions worksheet have been selected manually. Depending on the intracasies of your operation, you may well be able to automate this step.Presumably the first row in the Exceptions worksheet will constitute a header row. The routine will copy your data to the first blank cell(s) in column A below your header. Sub Test() Dim WS As Worksheet Dim sourceRng As Range, destRng As Range Set sourceRng = Selection Set WS = Workbooks("Processed Exceptions.xls").Sheets("Sheet1") Set destRng = WS.Cells(Rows.Count, "A").End(xlUp)(2) sourceRng.Copy destRng End Sub --- Regards, Norman. "tiptop " wrote in message ... I'm a little bit lost. The 2nd case is most likely what I will need to use. But, I can't figure out how to put it in my code. Below is kind of where I am at... Sub ProcessedExceptions() ChDir "C:\Documents and Settings\Administrator\Desktop" Workbooks.Open Filename:= _ "C:\Documents and Settings\Administrator\Desktop\Processed Exceptions.xls" ActiveWindow.WindowState = xlMinimized Workbooks("Online Exceptions.xls").Activate End Sub Basically, for example. The info that is in (Online Exceptions.xls, cell S13) needs to be entered in file (Processed Exceptions.xls, Cell A1, A2....). I'm trying to make life a little easier and tree friendly at work...I process these exceptions roughly 700-900 exceptions a day (each on an individual sheet of paper) so this will make my life a LOT easier if I can figure out the correct code. Thanks again for all the help!! --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Updating a spreadsheet automatically | Excel Discussion (Misc queries) | |||
help with updating spreadsheet | New Users to Excel | |||
help with updating spreadsheet | Excel Discussion (Misc queries) | |||
Updating 1 spreadsheet from another | Excel Worksheet Functions | |||
Updating from another spreadsheet | Excel Programming |