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

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default updating spreadsheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default updating spreadsheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default updating spreadsheet

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
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
Updating a spreadsheet automatically Duncs Excel Discussion (Misc queries) 1 November 29th 06 07:32 PM
help with updating spreadsheet JAZZNAURA New Users to Excel 2 August 2nd 06 05:39 PM
help with updating spreadsheet JAZZNAURA Excel Discussion (Misc queries) 0 August 1st 06 09:30 PM
Updating 1 spreadsheet from another Sal Excel Worksheet Functions 4 December 17th 04 11:03 PM
Updating from another spreadsheet Merry Excel Programming 0 November 18th 03 10:26 PM


All times are GMT +1. The time now is 12:29 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"