Solved

Google spreadsheet

Posted on 2014-03-24
5
361 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

There are many add-ons for Google docs, slides and sheets that can be extremely helpful in keeping your files organized and simple to use. Add-ons are installed into your Google docs, slides or sheets through Google's Add-On Store. One of my favorit…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial demonstrates in Google Analytics how to create a custom report that shows you traffic over time using the month of year dimensions. There are also instructions on how to fix Google's odd month of year formatting, which Microsoft …

831 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