Solved

Google spreadsheet

Posted on 2014-03-24
5
357 Views
Last Modified: 2015-03-02
Hi All,

I have 3 sheets.
The rows B-G contain dates.
Row A contains Keywords.
The dates in each row are based on the dates entered in Column B.

I want sheet 4 to display the contents of the A rows of all 3 sheets IF the date is today….

Please find the attached excel sheet downloaded from google docs .

Thanks
Lernplan.xls
0
Comment
Question by:magento
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:ChloesDad
ID: 39951806
The easiest way is by using a macro

Sub UpdateSheet(tableNo As Integer)
  
  Dim RowDate
  Dim NowDate
  Dim RowNumber As Integer
  Dim Heading As String
  
  
  
  ThisWorkbook.Sheets(tableNo).Activate
  RowNumber = 2
  
  For Each rw In ActiveSheet.Rows
    Heading = rw.Cells(1, 1).Value
  
    If Heading <> "" Then
    
        RowDate = Int(rw.Cells(1, 2).Value)
        NowDate = Int(Now)
        
        If RowDate = NowDate Then
    
            ThisWorkbook.Sheets(4).Cells(RowNumber, tableNo).Value = Heading
            RowNumber = RowNumber + 1
    
        End If
        
    End If
    
    
  
  
  Next




End Sub


Sub UpdateTable()

    Call UpdateSheet(1)
    Call UpdateSheet(2)
    Call UpdateSheet(3)


End Sub

Open in new window


You can then either call UpdateTable when the sheet loads, or set it up to be run on a hot key
0
 
LVL 5

Author Comment

by:magento
ID: 39952323
Hi,

If its an excel sheet i know how to add that macro . Is it possible to add them under google spreadsheet ? If so how ?

Thanks
0
 
LVL 5

Author Comment

by:magento
ID: 39952338
I created a module and pasted ur code and hit F5 , Nothing happened. Please advice.
0
 
LVL 15

Accepted Solution

by:
ChloesDad earned 500 total points
ID: 39952492
Firstly, it is just an excel spread sheet, or at least that's what you posted. I was able to open it in excel.


I have attached your supplied spreadsheet with my code.

Click View-Macros - View Macro. You may have to enable Macros to be able to see it. You can then click on the play button and the macro will run.
Lernplan.xlsm
0
 
LVL 5

Author Closing Comment

by:magento
ID: 39955139
Thank you .
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate using Google Doc how to import live data to another spreadsheet in Google Spreadsheets using the IMPORTRANGE function.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now