Write code in vba to determine the row number

Assignment Help Visual Basic Programming
Reference no: EM13843689

 

1)

A. How do you access the VBA window?

B. Write code in VBA to determine the row number of the last row with data. Are there any precautions/edge cases to be aware of for that code?

C. Please see EXCEL Attached file with two sheets:

1. "Base", which has data from 7/13-7/26

2. "Addition", which has data from 7/20-8/02.

Write a function in VBA to refresh the data in "Base" with that in "Addition". In other words:

1. Remove records in "Base" if they fall within the date range of records in "Addition"

2. Append the records from "Addition" to "Base". Do not include the Grand Total row

when appending

2)

SQL Case Study:

This is one of the worst query written according to a production support personnel. Why do you think that is the case? And how can you improve? Give 2-3 areas that can be improved.

SELECT
t.*
FROM
(
SELECT
sub.*
FROM
(
SELECT
log_inner.*
FROM
(
SELECT
-- log_visit.*, log_action.name
-- log_visit.*, log_link_visit_action.server_time, log_action.name
log_visit.idvisit,
log_visit.idsite,
CONV(HEX(log_visit.idvisitor), 16, 10) AS idvisitor,
visitor_localtime,
visitor_returning,
visitor_count_visits,
visitor_days_since_last,
visitor_days_since_order,
visitor_days_since_first,
visit_first_action_time,
visit_last_action_time,
visit_exit_idaction_url,
visit_exit_idaction_name,
visit_entry_idaction_url,
visit_entry_idaction_name,
visit_total_actions,
visit_total_searches,
visit_total_events,
visit_total_time,
visit_goal_converted,
visit_goal_buyer,
referer_type,
referer_name,
referer_url,
referer_keyword,
config_id,
config_os,
config_os_version,
config_browser_name,
config_browser_version,
config_device_type,
config_device_brand,
config_device_model,
config_resolution,
config_pdf,
config_flash,
config_java,
config_director,
config_quicktime,
config_realplayer,
config_windowsmedia,
config_gears,
config_silverlight,
config_cookie,
inet_ntoa(CONV(HEX(location_ip), 16, 10)) AS location_ip,
location_browser_lang,
location_country,
location_region,
location_city,
location_latitude,
location_longitude,
log_visit.custom_var_k1,
log_visit.custom_var_v1,
log_visit.custom_var_k2,
log_visit.custom_var_v2,
log_visit.custom_var_k3,
log_visit.custom_var_v3,
log_visit.custom_var_k4,
log_visit.custom_var_v4,
log_visit.custom_var_k5,
log_visit.custom_var_v5,
location_provider,
log_link_visit_action.server_time,
log_action. NAME
FROM
piwik_log_visit AS log_visit
LEFT JOIN piwik_log_link_visit_action AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit
LEFT JOIN piwik_log_action AS log_action ON log_action.idaction = log_link_visit_action.idaction_url
WHERE
(
log_visit.idsite IN ('8')
AND log_visit.visit_last_action_time>= '2014-10-31 00:00:00'
AND log_visit.visit_last_action_time<= '2014-10-31 23:59:59'
)
AND (
(
log_link_visit_action.idaction_url IN (
SELECT
idaction
FROM
piwik_log_action
WHERE
(
NAME LIKE CONCAT('%', 'success', '%') -- non indexed string comparison against the entire 91million row log_action table
AND type = 1
)
)
)
)
GROUP BY
log_visit.idvisit
) AS log_inner
ORDER BY
idsite,
visit_last_action_time DESC
) AS sub
GROUP BY
sub.idvisit
ORDER BY
sub.visit_last_action_time DESC
) AS t
WHERE
t. NAME = 'burialplanning.com/free-planning-kit-success/'
OR t. NAME = 'burialplanning.com/free-planning-kit-success-no-match/'
OR t. NAME = 'burialplanning.com/free-planning-kit-home-success/'
OR t. NAME = 'burialplanning.com/request-consultation-success/'
OR t. NAME REGEXP '^burialplanning.com/cemeteries/.+/successind/

OR t. NAME REGEXP '^burialplanning.com/cemeteries/.+/cemetery-post-planning-success/

OR t. NAME REGEXP '^burialplanning.com/cemeteries/.+/success-region/

Reference no: EM13843689

Questions Cloud

Consider dell whish is famouse : for its low inventory of parts (from Dell's suppliers) andfinished products (assembled at Dell's manufacturing facilities). If Dellmaintains low inventory of parts, and if Dell wants the suppliers to ship theparts soon after it places an order for th..
Why are paid-in-capital and retained earnings : Why are paid-in-capital and retained earnings
Cumulative effects: : Merle Company has operated for several years and always shows two years of financial statements for users to make better conclusions about trends.  In Year 20, the firm changed one of its accounting methods.  The change was from a GAAP method to a..
Onsider an electric part with two components in series : 2. Consider an electric part with two components in series (component A and componentB). Component A has a reliability of 88%, while component B has a reliability of 94%. Itis known that if the part fails, it will cost the company $1000.a)  What is t..
Write code in vba to determine the row number : Write code in VBA to determine the row number of the last row with data. Are there any precautions/edge cases to be aware of for that code
Contrast differences in accounting processes and procedure : contrast the differences in accounting processes and procedures
Write a prolog program to solve the water jugs problem : Write a Prolog program to solve the water jugs problem: There are two jugs, one holding 3 and the other 5 litres of water. A number of things can be done with the jugs: they can be filled, emptied, and dumped one into the other either until the pou..
Suppose that daily demand for bagels at the local coffee : Suppose that daily demand for bagels at the local coffee shop where you work is found to be Normally distributed with a mean of 250 and a standard deviation of 75 units
Financial analysis measures : Bring together various financial analysis measures and interpret their meaning in order to draw conclusions about various companies. Note that each situation provided is to be considered independently of the others.

Reviews

Write a Review

Visual Basic Programming Questions & Answers

  Develop a bankaccount windows form project

Develop a "BankAccount" windows form project, which will allow user to

  Organize the code for user readability

Organize the code for reusability, Provide documentation with embedded comments for reader understanding

  Create a connection to an access database

VBScript Database Query Lab, In this lab, students will complete the following objectives. Create a connection to an Access database

  Visual basic application which inputs series of integers

Winner of a sales contest would input number of units sold by each sales person. Write down visual basic application which inputs series of 10 integers and finds and displays largest.

  Describes the characteristics of the designed system

Describes the characteristics of the designed system - describes the characteristics of the designed system and well as how it will be important for the users at the company.

  Write a program that displays the patterns separately

Write a program that displays the patterns separately, one below the other in a TextBox - Maximize your use of repetition and maximize the number of output statements.

  Performing a calculation on that value

Individual Visual Logic Calculations. Select two to three Each task must include the following Inputing a value. Performing a calculation on that value. outputting the value. produce Visual Logic files to execute each of these steps.

  Create a visual basic windows application

Create a Visual Basic Windows application. Use the following names for the solution, project, and form file, respectively: Georgetown Solution, Georgetown Project, and Main Form.vb. The interface allow the user to enter a five-digit credit card nu..

  Create a computer program that calculates the zero

Using Microsoft Visual Basic for Applications in Excel, create a computer program that calculates the zero(s) of the equation f(x)=e^(x)-10x=0 by using the inverse linear interpolation (regula falsi) method.

  A small airline has just purchased a computer for its new

a small airline has just purchased a computer for its new automated reservations system. youve been asked to develop

  What do you understand by event driven programming

What do you understand by event driven programming? List and explain about some of the events supported by Visual Basic Objects - what are the different data types supported by Visual Basic ? How they can be declared? Also mention their uses.

  Vv boards system

VV Boards System - To demonstrate completing and delivering a prototype RAD system using OOPs capabilities of VB.NET. CIS 3145 Business Application Development with Visual Basic

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd